Code Review
/
apps
/
agl-service-can-low-level.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
| inline |
side by side
Fix memory leaks
[apps/agl-service-can-low-level.git]
/
CAN-binder
/
low-can-binding
/
diagnostic
/
diagnostic-manager.cpp
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
(file)
--- 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