WNM: Fix memory leak on error path

Signed-hostap: Jouni Malinen <j@w1.fi>
This commit is contained in:
Jouni Malinen 2012-12-16 19:31:25 +02:00
parent 4da10640a7
commit 14df897c7a
1 changed files with 2 additions and 0 deletions

View 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;
}