From: Romain Forlot Date: Fri, 18 Jan 2019 13:42:34 +0000 (+0100) Subject: Fix: double free issue X-Git-Tag: 7.99.1^0 X-Git-Url: https://gerrit.automotivelinux.org/gerrit/gitweb?a=commitdiff_plain;h=refs%2Fchanges%2F06%2F21206%2F5;p=apps%2Fagl-service-can-low-level.git Fix: double free issue handle is already freed during the active_diagnostic_request destruction. Bug-AGL: SPEC-2415 Change-Id: Ia26d5c9d2974ca34d411c3182b218141a84c8f21 Signed-off-by: Romain Forlot --- diff --git a/low-can-binding/diagnostic/diagnostic-manager.cpp b/low-can-binding/diagnostic/diagnostic-manager.cpp index 55e61084..ba4b0c87 100644 --- a/low-can-binding/diagnostic/diagnostic-manager.cpp +++ b/low-can-binding/diagnostic/diagnostic-manager.cpp @@ -188,8 +188,6 @@ 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(); - if(entry->get_handle()) - delete(entry->get_handle()); delete entry; entry = nullptr; }