Fix memory leaks and other mistakes on errors

Reviewed-by: Rich Salz <rsalz@openssl.org>
Reviewed-by: Richard Levitte <levitte@openssl.org>
(cherry picked from commit 3f6c769187)
This commit is contained in:
Alessandro Ghedini
2015-10-08 14:38:57 +02:00
committed by Richard Levitte
parent 5a1e6b1342
commit e90f1d9b74
9 changed files with 46 additions and 22 deletions

View File

@@ -2485,6 +2485,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;