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:57 +0100 |
commit | 15de0f609c859883347357aaf6cc685c797358bd (patch) | |
tree | 3a99dbf3f7bdaf4e1c2226e8c9c773788a032f2e /ssl | |
parent | 4824e7d6e98895c5fa9f725151fca01eda0707a9 (diff) |
Fix memory leak.
PR#2531
(cherry picked from commit 44724beeadf95712a42a8b21dc71bf110e89a262)
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 eefe93ed13..ce144c2d73 100644 --- a/ssl/t1_lib.c +++ b/ssl/t1_lib.c @@ -3381,7 +3381,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; |