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:
34b9acb
)
Don't leak memory on error path in dane_ctx_enable()
author
Matt Caswell
<matt@openssl.org>
Wed, 27 Apr 2016 13:22:20 +0000
(14:22 +0100)
committer
Matt Caswell
<matt@openssl.org>
Thu, 28 Apr 2016 12:13:09 +0000
(13:13 +0100)
The function dane_ctx_enable() allocated some memory that it did not
free in an error path.
Reviewed-by: Richard Levitte <levitte@openssl.org>
ssl/ssl_lib.c
patch
|
blob
|
history
diff --git
a/ssl/ssl_lib.c
b/ssl/ssl_lib.c
index f93b98f42f1f392ecb1b8989c5fb9c04f2e8b016..99d88b31ee3622ad745f95021dcf24899a6785ca 100644
(file)
--- a/
ssl/ssl_lib.c
+++ b/
ssl/ssl_lib.c
@@
-215,6
+215,7
@@
static int dane_ctx_enable(struct dane_ctx_st *dctx)
mdord = OPENSSL_zalloc(n * sizeof(*mdord));
if (mdord == NULL || mdevp == NULL) {
+ OPENSSL_free(mdord);
OPENSSL_free(mdevp);
SSLerr(SSL_F_DANE_CTX_ENABLE, ERR_R_MALLOC_FAILURE);
return 0;