diff options
author | Romain Forlot <romain.forlot@iot.bzh> | 2017-05-24 00:46:43 +0200 |
---|---|---|
committer | Romain Forlot <romain.forlot@iot.bzh> | 2017-05-24 00:46:43 +0200 |
commit | ab4d52b65359c571267c71244578321580520c20 (patch) | |
tree | 557895b576e234b0342807aa64971577b22687d1 /CAN-binder/low-can-binding/diagnostic/diagnostic-manager.cpp | |
parent | d35da77dcd5273b54177f8bc8ae7e5992bb3ca09 (diff) |
Fix memory leaks
Change-Id: I4a33b6d5f1f3b73af113aff62b024329b0ed5288
Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
Diffstat (limited to 'CAN-binder/low-can-binding/diagnostic/diagnostic-manager.cpp')
-rw-r--r-- | CAN-binder/low-can-binding/diagnostic/diagnostic-manager.cpp | 2 |
1 files changed, 2 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 4f4b842..49013f8 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 |