projects
/
oweals
/
openssl.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
cb34cb1
)
Fix memory leak.
author
Dr. Stephen Henson
<steve@openssl.org>
Sun, 29 Jun 2014 12:51:30 +0000
(13:51 +0100)
committer
Dr. Stephen Henson
<steve@openssl.org>
Sun, 29 Jun 2014 12:52:03 +0000
(13:52 +0100)
PR#2531
(cherry picked from commit
44724beeadf95712a42a8b21dc71bf110e89a262
)
ssl/t1_lib.c
patch
|
blob
|
history
diff --git
a/ssl/t1_lib.c
b/ssl/t1_lib.c
index 3b8d5153eb6f669e96b3aaf3b7c156bb0dff40d7..f7abce9258ede420866813be7bdd1210c716bc55 100644
(file)
--- a/
ssl/t1_lib.c
+++ b/
ssl/t1_lib.c
@@
-2361,7
+2361,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;