aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJouni Malinen <jouni@codeaurora.org>2019-05-08 17:25:10 (GMT)
committerJouni Malinen <j@w1.fi>2019-05-08 17:25:10 (GMT)
commitc5622b43cd8d01c643a19ddccf18ee8b65b48d5f (patch)
tree84cc7dcd0a246dc3fe034cf2a28d64a5786719c7
parent1cdfe8d23f9feb9523daad286b473fe010105977 (diff)
downloadhostap-c5622b43cd8d01c643a19ddccf18ee8b65b48d5f.zip
hostap-c5622b43cd8d01c643a19ddccf18ee8b65b48d5f.tar.gz
hostap-c5622b43cd8d01c643a19ddccf18ee8b65b48d5f.tar.bz2
DPP: Fix a memory leak on duplicate Authentication Response
Do not allow auth->peer_protocol_key to be overridden without having freed the previously stored key in case two Authentication Response messages are received. 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 fd2e9f4..4b8d838 100644
--- a/src/common/dpp.c
+++ b/src/common/dpp.c
@@ -3753,6 +3753,7 @@ dpp_auth_resp_rx(struct dpp_authentication *auth, const u8 *hdr,
}
EVP_PKEY_CTX_free(ctx);
ctx = NULL;
+ EVP_PKEY_free(auth->peer_protocol_key);
auth->peer_protocol_key = pr;
pr = NULL;