summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@openwrt.org>2013-12-11 19:19:11 +0100
committerFelix Fietkau <nbd@openwrt.org>2013-12-11 19:21:54 +0100
commitc317cccbef29bc4ec441ee89778f763618c5b4b4 (patch)
tree00d299042e3974768997442c1592f2b0fe3a5172
parent4106d0ced43327848791ed6182f28d461c01a4b8 (diff)
wireless: remove freed wireless devices from the vlist avl tree
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
-rw-r--r--wireless.c7
1 files 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