]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
wpa_supplicant: Fix potential memleak on an error path
authorAndrei Otcheretianski <andrei.otcheretianski@intel.com>
Tue, 16 Feb 2021 13:23:56 +0000 (15:23 +0200)
committerJouni Malinen <j@w1.fi>
Fri, 19 Feb 2021 22:18:45 +0000 (00:18 +0200)
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 <andrei.otcheretianski@intel.com>
wpa_supplicant/interworking.c

index 1ff142a8d4e1b2ea1a9399a926560366dacd0cc8..5db473cf73c095ebc99b64cdae45351229f3cbf0 100644 (file)
@@ -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;
                }