diff options
author | Matt Caswell <matt@openssl.org> | 2016-04-27 14:22:20 +0100 |
---|---|---|
committer | Matt Caswell <matt@openssl.org> | 2016-04-28 13:13:09 +0100 |
commit | b3bd3d5af8ed31f438db4367ce3a4bd43067e764 (patch) | |
tree | c6c59005d40059a215bfefe956da8ff6259b26c3 | |
parent | 34b9acbd3f81b46967f692c0af49020c8c405746 (diff) | |
download | openssl-b3bd3d5af8ed31f438db4367ce3a4bd43067e764.tar.gz |
Don't leak memory on error path in dane_ctx_enable()
The function dane_ctx_enable() allocated some memory that it did not
free in an error path.
Reviewed-by: Richard Levitte <levitte@openssl.org>
-rw-r--r-- | ssl/ssl_lib.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/ssl/ssl_lib.c b/ssl/ssl_lib.c index f93b98f42f..99d88b31ee 100644 --- 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; |