From ad86c91b389560e53f5309b5d46e2fdc1c71211f Mon Sep 17 00:00:00 2001 From: Denis Kenzior Date: Fri, 7 Nov 2014 22:35:07 -0600 Subject: [PATCH] wiphy: Fix memory leak Whenever we find an existing BSS, we should free the old object since it is being removed from the old_bss_list via l_queue_remove_if --- src/wiphy.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/wiphy.c b/src/wiphy.c index 08b38f34..c4ea99b0 100644 --- a/src/wiphy.c +++ b/src/wiphy.c @@ -641,6 +641,8 @@ static void parse_bss(struct netdev *netdev, struct l_genl_attr *attr) bss_address_to_string(bss)); if (network) network->bss = bss; + + bss_free(old_bss); } l_queue_push_head(netdev->bss_list, bss);