eiwd

no dbus iwd with iwctl functionality
git clone https://git.daat.foo/repos/eiwd.git
Log | Files | Refs | Submodules | README | LICENSE

commit d773c0b4ac704ce3ad259f5405b995ec8c9d3a56
parent 2b0b5d417344c2af74fee588a6d2e4952d8bf210
Author: Denis Kenzior <denkenz@gmail.com>
Date:   Fri, 28 May 2021 22:50:05 -0500

netdev: Do not leak netdev objects

If the daemon is started and killed rapidly on startup, it is possible
for netdev_shutdown to be called prior to manager processing messages
that actually create the netdev itself.  Since the netdev_list has
already been freed, the storage is lost.  Fix that by destroying
netdev_list only when the module is unloaded.

Diffstat:
Msrc/netdev.c | 4+---
1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/src/netdev.c b/src/netdev.c @@ -5959,6 +5959,7 @@ static void netdev_exit(void) watchlist_destroy(&netdev_watches); l_queue_destroy(netdev_list, netdev_free); + netdev_list = NULL; l_genl_family_free(nl80211); nl80211 = NULL; @@ -5979,9 +5980,6 @@ void netdev_shutdown(void) netdev_free(netdev); l_queue_pop_head(netdev_list); } - - l_queue_destroy(netdev_list, NULL); - netdev_list = NULL; } IWD_MODULE(netdev, netdev_init, netdev_exit);