Code Review
/
apps
/
low-level-can-service.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
| inline |
side by side
Delete pointer and content, possible memory leak
[apps/low-level-can-service.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
826d26b
..
8ed8a78
100644
(file)
--- 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());