WPS: Fix memory leak with wps_ie in wpa_bss_is_wps_candidate()

Fix possible memory leak in case if WPS is not enabled on the interface
for connection. This path was missed in commit
fae7b37260 ('WPS: Do not expire probable
BSSes for WPS connection').

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
This commit is contained in:
vamsi krishna 2016-06-17 14:34:12 +05:30 committed by Jouni Malinen
parent 7309e804cf
commit 00ec535060

View file

@ -338,6 +338,7 @@ static int wpa_bss_is_wps_candidate(struct wpa_supplicant *wpa_s,
wpabuf_free(wps_ie);
return ret;
}
wpabuf_free(wps_ie);
#endif /* CONFIG_WPS */
return 0;