OWE: Fix a possible memory leak on error path

Properly handle the case where OWE IE is allocated, but
there is no space left to add it in the WPA IE buffer.

Signed-off-by: Ilan Peer <ilan.peer@intel.com>
This commit is contained in:
Ilan Peer 2019-04-03 15:16:15 +03:00 committed by Jouni Malinen
parent 277fa92b37
commit 0487967153

View file

@ -2846,8 +2846,8 @@ static u8 * wpas_populate_assoc_ies(
os_memcpy(wpa_ie + wpa_ie_len,
wpabuf_head(owe_ie), wpabuf_len(owe_ie));
wpa_ie_len += wpabuf_len(owe_ie);
wpabuf_free(owe_ie);
}
wpabuf_free(owe_ie);
}
#endif /* CONFIG_OWE */