]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
WMM AC: Fix memory leak on deinit without disassoc event
authorJouni Malinen <jouni@qca.qualcomm.com>
Thu, 27 Nov 2014 17:00:02 +0000 (19:00 +0200)
committerJouni Malinen <j@w1.fi>
Thu, 27 Nov 2014 17:00:02 +0000 (19:00 +0200)
It was possible for wmm_ac_deinit() not getting called when an interface
was removed in a sequence where disassociation was not reported and
wmm_ac_notify_disassoc() did not get called. This resulted in leaking
whatever memory was allocated for WMM AC parameters. Fix that by calling
wmm_ac_notify_disassoc() from wpa_supplicant_cleanup().

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
wpa_supplicant/wpa_supplicant.c

index 140e0e21f7903c98c25a2b2ab74abe83a8bf6775..9d4a14e923541a105814f3a1a0ba5ee18540088c 100644 (file)
@@ -523,6 +523,8 @@ static void wpa_supplicant_cleanup(struct wpa_supplicant *wpa_s)
                wpabuf_free(wpa_s->vendor_elem[i]);
                wpa_s->vendor_elem[i] = NULL;
        }
+
+       wmm_ac_notify_disassoc(wpa_s);
 }