aboutsummaryrefslogtreecommitdiffstats
path: root/wpa_supplicant/wpa_supplicant.c
diff options
context:
space:
mode:
authorIlan Peer <ilan.peer@intel.com>2019-04-03 12:16:15 (GMT)
committerJouni Malinen <j@w1.fi>2019-04-06 14:02:13 (GMT)
commit0487967153aca5eb83c12578a2d27648b9f69d95 (patch)
treed6362d7534de9579317c0f3758e8172ab7018991 /wpa_supplicant/wpa_supplicant.c
parent277fa92b376726dbe4bdc765ed2e084d8050ee1e (diff)
downloadhostap-0487967153aca5eb83c12578a2d27648b9f69d95.zip
hostap-0487967153aca5eb83c12578a2d27648b9f69d95.tar.gz
hostap-0487967153aca5eb83c12578a2d27648b9f69d95.tar.bz2
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>
Diffstat (limited to 'wpa_supplicant/wpa_supplicant.c')
-rw-r--r--wpa_supplicant/wpa_supplicant.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/wpa_supplicant/wpa_supplicant.c b/wpa_supplicant/wpa_supplicant.c
index a34e022..57d3f12 100644
--- a/wpa_supplicant/wpa_supplicant.c
+++ b/wpa_supplicant/wpa_supplicant.c
@@ -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 */