From: Felix Fietkau Date: Wed, 11 Dec 2013 18:19:11 +0000 (+0100) Subject: wireless: remove freed wireless devices from the vlist avl tree X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=c317cccbef29bc4ec441ee89778f763618c5b4b4;p=oweals%2Fnetifd.git wireless: remove freed wireless devices from the vlist avl tree Signed-off-by: Felix Fietkau --- diff --git a/wireless.c b/wireless.c index 1f7fc5d..3460337 100644 --- a/wireless.c +++ b/wireless.c @@ -270,9 +270,10 @@ __wireless_device_set_up(struct wireless_device *wdev) static void wireless_device_free(struct wireless_device *wdev) { - vlist_flush_all(&wdev->interfaces); - free(wdev->config); - free(wdev); + vlist_flush_all(&wdev->interfaces); + avl_delete(&wireless_devices.avl, &wdev->node.avl); + free(wdev->config); + free(wdev); } static void