summaryrefslogtreecommitdiffstats
path: root/crypto/param_build.c
diff options
context:
space:
mode:
authorMatt Caswell <matt@openssl.org>2020-04-24 11:44:15 +0100
committerMatt Caswell <matt@openssl.org>2020-05-04 09:30:55 +0100
commita6f8a834ba6f877baa427e3d25694d49beb29306 (patch)
tree8f7e9fa1f643dd9774f93d815cf75ad301570590 /crypto/param_build.c
parent1c4f340dd35f0ca48e263ab85399a965e1125ac6 (diff)
Ensure OSSL_PARAM_BLD_free() can accept a NULL
All OpenSSL free functions should accept NULL. Reviewed-by: Shane Lontis <shane.lontis@oracle.com> (Merged from https://github.com/openssl/openssl/pull/11635)
Diffstat (limited to 'crypto/param_build.c')
-rw-r--r--crypto/param_build.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/crypto/param_build.c b/crypto/param_build.c
index 43b194bcea..76522cd377 100644
--- a/crypto/param_build.c
+++ b/crypto/param_build.c
@@ -125,6 +125,8 @@ static void free_all_params(OSSL_PARAM_BLD *bld)
void OSSL_PARAM_BLD_free(OSSL_PARAM_BLD *bld)
{
+ if (bld == NULL)
+ return;
free_all_params(bld);
sk_OSSL_PARAM_BLD_DEF_free(bld->params);
OPENSSL_free(bld);