forked from external/yambar
module/network: plug memory leak
Free the 'ifaces' list, not just its contents.
This commit is contained in:
parent
3431d5fc75
commit
9cc5e0f7a7
1 changed files with 4 additions and 1 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Reference in a new issue