diff mbox series

wpa_supplicant: Fix potential memleak

Message ID 20210216132357.4588-1-andrei.otcheretianski@intel.com
State Accepted
Headers show
Series PASN: Correctly set RSNXE bits | expand

Commit Message

Andrei Otcheretianski Feb. 16, 2021, 1:23 p.m. UTC
Fix a memory leak on error path.

Signed-off-by: Andrei Otcheretianski <andrei.otcheretianski@intel.com>
---
 wpa_supplicant/interworking.c | 1 +
 1 file changed, 1 insertion(+)

Comments

Jouni Malinen Feb. 19, 2021, 11:51 p.m. UTC | #1
On Tue, Feb 16, 2021 at 03:23:56PM +0200, Andrei Otcheretianski wrote:
> Fix a memory leak on error path.

Thanks, applied.
diff mbox series

Patch

diff --git a/wpa_supplicant/interworking.c b/wpa_supplicant/interworking.c
index 1ff142a8d4..5db473cf73 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;
 		}