From e7864bd53878176fd7855d31e9141bd09efc33ad Mon Sep 17 00:00:00 2001 From: Romain Forlot Date: Thu, 1 Jun 2017 15:58:44 +0200 Subject: Delete pointer and content, possible memory leak Change-Id: I21e65bcaaa444c03bbc634f1d437e6ff363623b6 Signed-off-by: Romain Forlot --- CAN-binder/low-can-binding/diagnostic/diagnostic-manager.cpp | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'CAN-binder/low-can-binding') diff --git a/CAN-binder/low-can-binding/diagnostic/diagnostic-manager.cpp b/CAN-binder/low-can-binding/diagnostic/diagnostic-manager.cpp index 826d26b..8ed8a78 100644 --- a/CAN-binder/low-can-binding/diagnostic/diagnostic-manager.cpp +++ b/CAN-binder/low-can-binding/diagnostic/diagnostic-manager.cpp @@ -458,6 +458,11 @@ active_diagnostic_request_t* diagnostic_manager_t::add_recurring_request(Diagnos entry->set_handle(shims_, request); if(create_rx_filter(OBD2_FUNCTIONAL_BROADCAST_ID, frequencyHz) < 0) + { + recurring_requests_.pop_back(); + delete entry; + entry = nullptr; + } else { start_diagnostic_request(&shims_, entry->get_handle()); -- cgit 1.2.3-korg