blob: 157347d6d76f066ec5dc26fb4efafe63d6d767ed [file] [log] [blame]
developer29c4d2d2022-12-26 19:41:22 +08001From 639bb1bb912029ec4ff110c3ed807b62f583d6bf Mon Sep 17 00:00:00 2001
2From: Glenn Strauss <gstrauss@gluelogic.com>
3Date: Sun, 9 Oct 2022 04:02:44 -0400
4Subject: [PATCH 7/7] DPP: fix memleak of intro.peer_key
5
6fix memleak of intro.peer_key in wpas_dpp_rx_peer_disc_resp()
7
8Signed-off-by: Glenn Strauss <gstrauss@gluelogic.com>
9---
10 wpa_supplicant/dpp_supplicant.c | 4 +++-
11 1 file changed, 3 insertions(+), 1 deletion(-)
12
13--- a/wpa_supplicant/dpp_supplicant.c
14+++ b/wpa_supplicant/dpp_supplicant.c
15@@ -2610,6 +2610,8 @@ static void wpas_dpp_rx_peer_disc_resp(s
16 return;
17 }
18
19+ os_memset(&intro, 0, sizeof(intro));
20+
21 trans_id = dpp_get_attr(buf, len, DPP_ATTR_TRANSACTION_ID,
22 &trans_id_len);
23 if (!trans_id || trans_id_len != 1) {
24@@ -2720,7 +2722,7 @@ static void wpas_dpp_rx_peer_disc_resp(s
25 wpa_supplicant_req_scan(wpa_s, 0, 0);
26 }
27 fail:
28- os_memset(&intro, 0, sizeof(intro));
29+ dpp_peer_intro_deinit(&intro);
30 }
31
32