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:
ba2502d
)
Fix a memory leak in tls1_mac
author
Bernd Edlinger
<bernd.edlinger@hotmail.de>
Fri, 16 Mar 2018 20:36:48 +0000
(21:36 +0100)
committer
Bernd Edlinger
<bernd.edlinger@hotmail.de>
Sat, 17 Mar 2018 07:29:45 +0000
(08:29 +0100)
Reviewed-by: Tim Hudson <tjh@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/5651)
ssl/record/ssl3_record.c
patch
|
blob
|
history
diff --git
a/ssl/record/ssl3_record.c
b/ssl/record/ssl3_record.c
index f6e59d2f8421378470e1af4a126bd6e6f20144e0..6e1ff3f5630e422ca4f685f9cd96419126c2199e 100644
(file)
--- a/
ssl/record/ssl3_record.c
+++ b/
ssl/record/ssl3_record.c
@@
-988,8
+988,10
@@
int tls1_mac(SSL *ssl, SSL3_RECORD *rec, unsigned char *md, int sending)
mac_ctx = hash;
} else {
hmac = EVP_MD_CTX_new();
- if (hmac == NULL || !EVP_MD_CTX_copy(hmac, hash))
+ if (hmac == NULL || !EVP_MD_CTX_copy(hmac, hash)) {
+ EVP_MD_CTX_free(hmac);
return -1;
+ }
mac_ctx = hmac;
}