wpa_supplicant: Fix memory leak in wfd_subelems error path
Memory allocated by calling function ieee802_11_vendor_ie_concat() was not freed on an error path int ctrl_iface BSS command. Signed-hostap: Eytan Lifshitz <eytan.lifshitz@intel.com>
This commit is contained in:
parent
88853aedf6
commit
5e6aa04b09
1 changed files with 3 additions and 1 deletions
|
@ -3504,8 +3504,10 @@ static int print_bss_info(struct wpa_supplicant *wpa_s, struct wpa_bss *bss,
|
||||||
WFD_IE_VENDOR_TYPE);
|
WFD_IE_VENDOR_TYPE);
|
||||||
if (wfd) {
|
if (wfd) {
|
||||||
ret = os_snprintf(pos, end - pos, "wfd_subelems=");
|
ret = os_snprintf(pos, end - pos, "wfd_subelems=");
|
||||||
if (ret < 0 || ret >= end - pos)
|
if (ret < 0 || ret >= end - pos) {
|
||||||
|
wpabuf_free(wfd);
|
||||||
return 0;
|
return 0;
|
||||||
|
}
|
||||||
pos += ret;
|
pos += ret;
|
||||||
|
|
||||||
pos += wpa_snprintf_hex(pos, end - pos,
|
pos += wpa_snprintf_hex(pos, end - pos,
|
||||||
|
|
Loading…
Reference in a new issue