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:
parent
277fa92b37
commit
0487967153
1 changed files with 1 additions and 1 deletions
|
@ -2846,8 +2846,8 @@ static u8 * wpas_populate_assoc_ies(
|
||||||
os_memcpy(wpa_ie + wpa_ie_len,
|
os_memcpy(wpa_ie + wpa_ie_len,
|
||||||
wpabuf_head(owe_ie), wpabuf_len(owe_ie));
|
wpabuf_head(owe_ie), wpabuf_len(owe_ie));
|
||||||
wpa_ie_len += wpabuf_len(owe_ie);
|
wpa_ie_len += wpabuf_len(owe_ie);
|
||||||
wpabuf_free(owe_ie);
|
|
||||||
}
|
}
|
||||||
|
wpabuf_free(owe_ie);
|
||||||
}
|
}
|
||||||
#endif /* CONFIG_OWE */
|
#endif /* CONFIG_OWE */
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue