diff options
author | Miroslav Franc <mfranc@gmx.com> | 2016-07-14 17:14:08 +0200 |
---|---|---|
committer | Rich Salz <rsalz@openssl.org> | 2016-07-16 12:32:34 -0400 |
commit | 563c1ec61848073e3739dd126cf1950e338c820d (patch) | |
tree | bd464f937e002f73ba6b9b8976f2dbc6b387e093 /ssl | |
parent | 28e90f69fbcdcd3c06359a53adceb2dbdfaba614 (diff) |
fix memory leaks
Reviewed-by: Kurt Roeckx <kurt@openssl.org>
Reviewed-by: Rich Salz <rsalz@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/1313)
Diffstat (limited to 'ssl')
-rw-r--r-- | ssl/ssl_rsa.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/ssl/ssl_rsa.c b/ssl/ssl_rsa.c index aad65ead89..bb4e872ab4 100644 --- a/ssl/ssl_rsa.c +++ b/ssl/ssl_rsa.c @@ -110,6 +110,7 @@ int SSL_use_RSAPrivateKey(SSL *ssl, RSA *rsa) RSA_up_ref(rsa); if (EVP_PKEY_assign_RSA(pkey, rsa) <= 0) { RSA_free(rsa); + EVP_PKEY_free(pkey); return 0; } @@ -452,6 +453,7 @@ int SSL_CTX_use_RSAPrivateKey(SSL_CTX *ctx, RSA *rsa) RSA_up_ref(rsa); if (EVP_PKEY_assign_RSA(pkey, rsa) <= 0) { RSA_free(rsa); + EVP_PKEY_free(pkey); return 0; } |