]> git.ipfire.org Git - thirdparty/openssl.git/commitdiff
Avoid potential doublefree on dh object assigned to EVP_PKEY
authorTomas Mraz <tmraz@fedoraproject.org>
Tue, 20 Oct 2020 12:16:30 +0000 (14:16 +0200)
committerTomas Mraz <tmraz@fedoraproject.org>
Tue, 20 Oct 2020 12:16:30 +0000 (14:16 +0200)
Fixes regression from 7844f3c784bfc93c9b94ae5a4082f9d01e82e0af

Reviewed-by: Matt Caswell <matt@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/13194)

ssl/statem/statem_clnt.c

index 3bf8aacfc0b87e8b139895054b7427770db961d3..fd3b79c4efaee3fb0b6344c9b190f6ed6d8a7568 100644 (file)
@@ -2150,6 +2150,7 @@ static int tls_process_ske_dhe(SSL *s, PACKET *pkt, EVP_PKEY **pkey)
                  ERR_R_EVP_LIB);
         goto err;
     }
+    dh = NULL;
 
     if (!ssl_security(s, SSL_SECOP_TMP_DH, EVP_PKEY_security_bits(peer_tmp),
                       0, peer_tmp)) {