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>
This commit is contained in:
Jouni Malinen 2019-05-08 20:25:10 +03:00 committed by Jouni Malinen
parent 1cdfe8d23f
commit c5622b43cd

View File

@ -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;