summaryrefslogtreecommitdiffstats
path: root/CAN-binder/low-can-binding/diagnostic
diff options
context:
space:
mode:
authorRomain Forlot <romain.forlot@iot.bzh>2017-06-01 15:58:44 +0200
committerRomain Forlot <romain.forlot@iot.bzh>2017-06-01 18:40:13 +0200
commite7864bd53878176fd7855d31e9141bd09efc33ad (patch)
tree6a5fd11b35ddcff28fca5827d74a441ead630585 /CAN-binder/low-can-binding/diagnostic
parentc47d3c3b474b418d9471520517afd8c9e9893a39 (diff)
Delete pointer and content, possible memory leak
Change-Id: I21e65bcaaa444c03bbc634f1d437e6ff363623b6 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
Diffstat (limited to 'CAN-binder/low-can-binding/diagnostic')
-rw-r--r--CAN-binder/low-can-binding/diagnostic/diagnostic-manager.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/CAN-binder/low-can-binding/diagnostic/diagnostic-manager.cpp b/CAN-binder/low-can-binding/diagnostic/diagnostic-manager.cpp
index 826d26ba..8ed8a787 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());