diff options
author | Dr. Stephen Henson <steve@openssl.org> | 2014-06-29 13:51:30 +0100 |
---|---|---|
committer | Dr. Stephen Henson <steve@openssl.org> | 2014-06-29 13:51:30 +0100 |
commit | 44724beeadf95712a42a8b21dc71bf110e89a262 (patch) | |
tree | 3501cdae7f6d5f29282cc4f3bed7de321fe41f11 /ssl | |
parent | 76ed5a42ea68dd08bba44e4003b7e638e5d8a4a3 (diff) |
Fix memory leak.
PR#2531
Diffstat (limited to 'ssl')
-rw-r--r-- | ssl/t1_lib.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/ssl/t1_lib.c b/ssl/t1_lib.c index cf007f9cce..657ab1d1dd 100644 --- a/ssl/t1_lib.c +++ b/ssl/t1_lib.c @@ -3455,7 +3455,11 @@ static int tls_decrypt_ticket(SSL *s, const unsigned char *etick, int eticklen, } EVP_DecryptUpdate(&ctx, sdec, &slen, p, eticklen); if (EVP_DecryptFinal(&ctx, sdec + slen, &mlen) <= 0) + { + EVP_CIPHER_CTX_cleanup(&ctx); + OPENSSL_free(sdec); return 2; + } slen += mlen; EVP_CIPHER_CTX_cleanup(&ctx); p = sdec; |