Message ID | 20190403121615.4094-4-andrei.otcheretianski@intel.com |
---|---|
State | Accepted |
Headers | show |
Series | OWE: Fix a possible memory leak | expand |
On Wed, Apr 03, 2019 at 03:16:15PM +0300, Andrei Otcheretianski wrote: > Properly handle the case where OWE IE is allocated, but > there is no space left to add it in the WPA IE buffer. Thanks, applied.
diff --git a/wpa_supplicant/wpa_supplicant.c b/wpa_supplicant/wpa_supplicant.c index 7c9f58105f..6833ec11d4 100644 --- a/wpa_supplicant/wpa_supplicant.c +++ b/wpa_supplicant/wpa_supplicant.c @@ -2846,8 +2846,9 @@ 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 */