]> git.ipfire.org Git - thirdparty/openssl.git/blobdiff - ssl/s3_clnt.c
Fix memory leaks and other mistakes on errors
[thirdparty/openssl.git] / ssl / s3_clnt.c
index 2df5afe14e726ebb2e128798645ec294fca8dbf8..c25f801cadddc4773e79e1854a08fd28c386d029 100644 (file)
@@ -2411,6 +2411,7 @@ int ssl3_send_client_key_exchange(SSL *s)
                     || (pkey->pkey.rsa == NULL)) {
                     SSLerr(SSL_F_SSL3_SEND_CLIENT_KEY_EXCHANGE,
                            ERR_R_INTERNAL_ERROR);
+                    EVP_PKEY_free(pkey);
                     goto err;
                 }
                 rsa = pkey->pkey.rsa;