From: Andrei Otcheretianski Date: Tue, 16 Feb 2021 13:23:56 +0000 (+0200) Subject: wpa_supplicant: Fix potential memleak on an error path X-Git-Tag: hostap_2_10~549 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=be5f7f3746c7b66ca6a03b307d4ed77c3cbc9f0b;p=thirdparty%2Fhostap.git wpa_supplicant: Fix potential memleak on an error path extra_buf allocation was missed in one of the error cases. Fixes: 170775232d61 ("ANQP: Add support to specify frequency in ANQP_GET command") Signed-off-by: Andrei Otcheretianski --- diff --git a/wpa_supplicant/interworking.c b/wpa_supplicant/interworking.c index 1ff142a8d..5db473cf7 100644 --- a/wpa_supplicant/interworking.c +++ b/wpa_supplicant/interworking.c @@ -2793,6 +2793,7 @@ int anqp_send_req(struct wpa_supplicant *wpa_s, const u8 *dst, int freq, wpa_printf(MSG_WARNING, "ANQP: Cannot send MBO query to unknown BSS " MACSTR, MAC2STR(dst)); + wpabuf_free(extra_buf); return -1; }