From 639bb1bb912029ec4ff110c3ed807b62f583d6bf Mon Sep 17 00:00:00 2001 From: Glenn Strauss Date: Sun, 9 Oct 2022 04:02:44 -0400 Subject: [PATCH 7/7] DPP: fix memleak of intro.peer_key fix memleak of intro.peer_key in wpas_dpp_rx_peer_disc_resp() Signed-off-by: Glenn Strauss --- wpa_supplicant/dpp_supplicant.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) --- a/wpa_supplicant/dpp_supplicant.c +++ b/wpa_supplicant/dpp_supplicant.c @@ -2610,6 +2610,8 @@ static void wpas_dpp_rx_peer_disc_resp(s return; } + os_memset(&intro, 0, sizeof(intro)); + trans_id = dpp_get_attr(buf, len, DPP_ATTR_TRANSACTION_ID, &trans_id_len); if (!trans_id || trans_id_len != 1) { @@ -2720,7 +2722,7 @@ static void wpas_dpp_rx_peer_disc_resp(s wpa_supplicant_req_scan(wpa_s, 0, 0); } fail: - os_memset(&intro, 0, sizeof(intro)); + dpp_peer_intro_deinit(&intro); }