mirror of https://github.com/ARMmbed/mbed-os.git
Fix memory leak on NetworkInterface destruction
We dynamically allocate memory in every add_event_listener(), but we do not free it on NetworkInterface destruction.pull/11649/head
parent
31fb3f929b
commit
3d596468b4
|
@ -144,6 +144,7 @@ NetworkInterface::~NetworkInterface()
|
|||
ns_list_foreach_safe(iface_eventlist_entry_t, entry, event_list) {
|
||||
if (entry->iface == this) {
|
||||
ns_list_remove(event_list, entry);
|
||||
delete entry;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue