diff options
author | luxinyou <luxinyou@uniontech.com> | 2020-09-07 18:06:45 +1000 |
---|---|---|
committer | Shane Lontis <shane.lontis@oracle.com> | 2020-09-07 18:06:45 +1000 |
commit | 4348995b0d818203f37ffa51c9bdf4488cf24bad (patch) | |
tree | 72c8f7de071506917e26e8cb596ba78d53ece550 /crypto | |
parent | 385deae79f26dd685339d3141a06d04d6bd753cd (diff) | |
download | openssl-4348995b0d818203f37ffa51c9bdf4488cf24bad.zip openssl-4348995b0d818203f37ffa51c9bdf4488cf24bad.tar.gz openssl-4348995b0d818203f37ffa51c9bdf4488cf24bad.tar.bz2 |
Fix memory leaks in conf_def.c
Fixes #12471
CLA: trivial
Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Paul Dale <paul.dale@oracle.com>
Reviewed-by: Shane Lontis <shane.lontis@oracle.com>
(Merged from https://github.com/openssl/openssl/pull/12533)
Diffstat (limited to 'crypto')
-rw-r--r-- | crypto/conf/conf_def.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/crypto/conf/conf_def.c b/crypto/conf/conf_def.c index 1d34519..5475429 100644 --- a/crypto/conf/conf_def.c +++ b/crypto/conf/conf_def.c @@ -442,11 +442,13 @@ static int def_load_bio(CONF *conf, BIO *in, long *line) if (biosk == NULL) { if ((biosk = sk_BIO_new_null()) == NULL) { CONFerr(CONF_F_DEF_LOAD_BIO, ERR_R_MALLOC_FAILURE); + BIO_free(next); goto err; } } if (!sk_BIO_push(biosk, in)) { CONFerr(CONF_F_DEF_LOAD_BIO, ERR_R_MALLOC_FAILURE); + BIO_free(next); goto err; } /* continue with reading from the included BIO */ |