aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJouni Malinen <jouni@codeaurora.org>2019-05-08 17:38:10 (GMT)
committerJouni Malinen <j@w1.fi>2019-05-08 17:38:10 (GMT)
commit6602d9e3a6fa113cfbc6dd384ab11519c071b9f8 (patch)
tree9f7a456f920ae502cfc0a00cacbdf6191d77a87b
parentc5622b43cd8d01c643a19ddccf18ee8b65b48d5f (diff)
downloadhostap-6602d9e3a6fa113cfbc6dd384ab11519c071b9f8.zip
hostap-6602d9e3a6fa113cfbc6dd384ab11519c071b9f8.tar.gz
hostap-6602d9e3a6fa113cfbc6dd384ab11519c071b9f8.tar.bz2
DPP: Fix a memory leak in testing sequence
Do not allow auth->own_protocol_key to be overridden without having freed the previously stored key in case a test sequence in dpp_proto_auth_conf_replaced_by_resp is used. Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
-rw-r--r--src/common/dpp.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/common/dpp.c b/src/common/dpp.c
index 4b8d838..14934de 100644
--- a/src/common/dpp.c
+++ b/src/common/dpp.c
@@ -2787,6 +2787,7 @@ static int dpp_auth_build_resp_ok(struct dpp_authentication *auth)
#endif /* CONFIG_TESTING_OPTIONS */
wpa_hexdump(MSG_DEBUG, "DPP: R-nonce", auth->r_nonce, nonce_len);
+ EVP_PKEY_free(auth->own_protocol_key);
#ifdef CONFIG_TESTING_OPTIONS
if (dpp_protocol_key_override_len) {
const struct dpp_curve_params *tmp_curve;