From c317cccbef29bc4ec441ee89778f763618c5b4b4 Mon Sep 17 00:00:00 2001 From: Felix Fietkau Date: Wed, 11 Dec 2013 19:19:11 +0100 Subject: wireless: remove freed wireless devices from the vlist avl tree Signed-off-by: Felix Fietkau --- wireless.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) 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 -- cgit v1.2.3