Don't free the EVP_PKEY on error in set0_tmp_dh_pkey() functions
authorMatt Caswell <matt@openssl.org>
Mon, 6 Dec 2021 11:13:02 +0000 (11:13 +0000)
committerMatt Caswell <matt@openssl.org>
Tue, 7 Dec 2021 12:16:50 +0000 (12:16 +0000)
commite819b5727312477f8c1f56bf928e611ad7e78315
tree0a78495229bf9dc60c16fa2535be52575372ebc1
parent119f8145c3bde29aae5d5b18c44d1663df975ef5
Don't free the EVP_PKEY on error in set0_tmp_dh_pkey() functions

We should not be freeing the caller's key in the event of error.

Fixes #17196

Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Viktor Dukhovni <viktor@openssl.org>
Reviewed-by: Paul Dale <pauli@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/17209)
ssl/s3_lib.c
ssl/ssl_lib.c