summaryrefslogtreecommitdiffstats
path: root/crypto/param_build.c
diff options
context:
space:
mode:
authorPauli <paul.dale@oracle.com>2020-04-27 07:32:43 +1000
committerPauli <paul.dale@oracle.com>2020-04-30 20:21:16 +1000
commit92f0684d11de6e7ff35cd14d26160545451d1ea6 (patch)
tree695797875d2bc99422b5c86cf009eff4f30a44d4 /crypto/param_build.c
parentbb4f39114caabbc11caf7840db7bfcd2bf2ff430 (diff)
param bld: avoid freeing the param builder structure on error paths.
The param builder was recently modified so that it doesn't free the passed in param builder structure. Some of the error paths didn't get synced up with this change and resulted in double frees. Reviewed-by: Tomas Mraz <tmraz@fedoraproject.org> (Merged from https://github.com/openssl/openssl/pull/11651)
Diffstat (limited to 'crypto/param_build.c')
-rw-r--r--crypto/param_build.c2
1 files changed, 0 insertions, 2 deletions
diff --git a/crypto/param_build.c b/crypto/param_build.c
index c4624ec33e..43b194bcea 100644
--- a/crypto/param_build.c
+++ b/crypto/param_build.c
@@ -361,14 +361,12 @@ OSSL_PARAM *OSSL_PARAM_BLD_to_param(OSSL_PARAM_BLD *bld)
if (s == NULL) {
CRYPTOerr(CRYPTO_F_OSSL_PARAM_BLD_TO_PARAM,
CRYPTO_R_SECURE_MALLOC_FAILURE);
- OPENSSL_free(bld);
return NULL;
}
}
params = OPENSSL_malloc(total);
if (params == NULL) {
CRYPTOerr(CRYPTO_F_OSSL_PARAM_BLD_TO_PARAM, ERR_R_MALLOC_FAILURE);
- OPENSSL_free(bld);
OPENSSL_secure_free(s);
return NULL;
}