DPP: Fix memory leak of intro.peer_key in station handling

Fix memory leak of intro.peer_key in wpas_dpp_rx_peer_disc_resp(). The
other code paths were updated to use dpp_peer_intro_deinit(), but this
non-privacy-protection version of the station implementation was missed.

Fixes: 148de3e0dc ("DPP3: Private Peer Introduction protocol")
Signed-off-by: Glenn Strauss <gstrauss@gluelogic.com>
This commit is contained in:
Glenn Strauss 2022-11-08 00:05:52 -05:00 committed by Jouni Malinen
parent 8e364713ef
commit 0202b97741

View file

@ -2624,6 +2624,8 @@ static void wpas_dpp_rx_peer_disc_resp(struct wpa_supplicant *wpa_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) {
@ -2735,7 +2737,7 @@ static void wpas_dpp_rx_peer_disc_resp(struct wpa_supplicant *wpa_s,
wpa_supplicant_req_scan(wpa_s, 0, 0);
}
fail:
os_memset(&intro, 0, sizeof(intro));
dpp_peer_intro_deinit(&intro);
}