From 3882a70841b0ad0548ca8075e8fabd2915848389 Mon Sep 17 00:00:00 2001 From: Jouni Malinen Date: Thu, 27 Nov 2014 19:00:02 +0200 Subject: [PATCH] WMM AC: Fix memory leak on deinit without disassoc event 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 --- wpa_supplicant/wpa_supplicant.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/wpa_supplicant/wpa_supplicant.c b/wpa_supplicant/wpa_supplicant.c index 140e0e21f..9d4a14e92 100644 --- a/wpa_supplicant/wpa_supplicant.c +++ b/wpa_supplicant/wpa_supplicant.c @@ -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); }