]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
WNM: Fix memory leak on error path
authorJouni Malinen <j@w1.fi>
Sun, 16 Dec 2012 17:31:25 +0000 (19:31 +0200)
committerJouni Malinen <j@w1.fi>
Sun, 16 Dec 2012 17:31:25 +0000 (19:31 +0200)
Signed-hostap: Jouni Malinen <j@w1.fi>

wpa_supplicant/wnm_sta.c

index 35cd032b4d7f8002cff1cf783ee48e0bf6aba9e3..315722b8c82584c98c3ce48e8dfc8f0568d68e76 100644 (file)
@@ -99,6 +99,8 @@ int ieee802_11_send_wnmsleep_req(struct wpa_supplicant *wpa_s,
        if (mgmt == NULL) {
                wpa_printf(MSG_DEBUG, "MLME: Failed to allocate buffer for "
                           "WNM-Sleep Request action frame");
+               os_free(wnmsleep_ie);
+               os_free(wnmtfs_ie);
                return -1;
        }