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
Michal Paszta 2019-10-08 11:00:43 +03:00
parent 31fb3f929b
commit 3d596468b4
1 changed files with 1 additions and 0 deletions

View File

@ -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;
}
}
}