summaryrefslogtreecommitdiffstats
path: root/ssl
diff options
context:
space:
mode:
authorAlessandro Ghedini <alessandro@ghedini.me>2015-10-08 14:38:57 +0200
committerRichard Levitte <levitte@openssl.org>2015-10-23 19:58:54 +0200
commite90f1d9b74275c11e3492e521e46f4b1afa6f883 (patch)
tree2836966e5a5c05f9d2960ffd5efce899f50f5c58 /ssl
parent5a1e6b1342f776f9304d9fa374149e317903b737 (diff)
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 3f6c7691870d1cd2ad0e0c83638cef3f35a0b548)
Diffstat (limited to 'ssl')
-rw-r--r--ssl/s3_clnt.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/ssl/s3_clnt.c b/ssl/s3_clnt.c
index 12f1f8e171..a6209e7162 100644
--- a/ssl/s3_clnt.c
+++ b/ssl/s3_clnt.c
@@ -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;