X-Git-Url: https://gerrit.automotivelinux.org/gerrit/gitweb?a=blobdiff_plain;f=CAN-binder%2Flow-can-binding%2Fdiagnostic%2Fdiagnostic-manager.cpp;h=49013f8e9ff167f1d5ff1ddfa750f9643f7146d9;hb=ab4d52b65359c571267c71244578321580520c20;hp=4f4b842efc6ac6d6510dc0d78d5505af0927f209;hpb=d35da77dcd5273b54177f8bc8ae7e5992bb3ca09;p=apps%2Fagl-service-can-low-level.git diff --git a/CAN-binder/low-can-binding/diagnostic/diagnostic-manager.cpp b/CAN-binder/low-can-binding/diagnostic/diagnostic-manager.cpp index 4f4b842e..49013f8e 100644 --- a/CAN-binder/low-can-binding/diagnostic/diagnostic-manager.cpp +++ b/CAN-binder/low-can-binding/diagnostic/diagnostic-manager.cpp @@ -232,6 +232,8 @@ void diagnostic_manager_t::find_and_erase(active_diagnostic_request_t* entry, st void diagnostic_manager_t::cancel_request(active_diagnostic_request_t* entry) { entry->get_socket().close(); + delete entry; + entry = nullptr; } /// @brief Cleanup a specific request if it isn't running and get complete. As it is almost