module/network: plug memory leak

Free the 'ifaces' list, not just its contents.
This commit is contained in:
Daniel Eklöf 2024-06-09 10:08:38 +02:00
parent 3431d5fc75
commit 9cc5e0f7a7
No known key found for this signature in database
GPG key ID: 5BBD4992C116573F

View file

@ -119,7 +119,10 @@ destroy(struct module *mod)
if (m->urandom_fd >= 0)
close(m->urandom_fd);
tll_foreach(m->ifaces, it) free_iface(it->item);
tll_foreach(m->ifaces, it) {
free_iface(it->item);
tll_remove(m->ifaces, it);
}
free(m);
module_default_destroy(mod);