From 9cc5e0f7a7398f88f80a3520d44feecb645a0e3f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Ekl=C3=B6f?= Date: Sun, 9 Jun 2024 10:08:38 +0200 Subject: [PATCH] module/network: plug memory leak Free the 'ifaces' list, not just its contents. --- modules/network.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/modules/network.c b/modules/network.c index 9ed9964..c2f6ec3 100644 --- a/modules/network.c +++ b/modules/network.c @@ -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);