Skip to content

Commit

Permalink
Fix memory leak on NetworkInterface destruction
Browse files Browse the repository at this point in the history
We dynamically allocate memory in every add_event_listener(), but we do not free it on NetworkInterface destruction.
  • Loading branch information
michalpasztamobica committed Oct 8, 2019
1 parent ef4fe98 commit c11aed1
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions features/netsocket/NetworkInterface.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
}
}
Expand Down

0 comments on commit c11aed1

Please sign in to comment.