mirror of
https://codeberg.org/dnkl/yambar.git
synced 2025-04-24 12:55:41 +02:00
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)
|
if (m->urandom_fd >= 0)
|
||||||
close(m->urandom_fd);
|
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);
|
free(m);
|
||||||
module_default_destroy(mod);
|
module_default_destroy(mod);
|
||||||
|
|
Loading…
Add table
Reference in a new issue