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)
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;
}