From a6f8a834ba6f877baa427e3d25694d49beb29306 Mon Sep 17 00:00:00 2001 From: Matt Caswell Date: Fri, 24 Apr 2020 11:44:15 +0100 Subject: [PATCH] Ensure OSSL_PARAM_BLD_free() can accept a NULL All OpenSSL free functions should accept NULL. Reviewed-by: Shane Lontis (Merged from https://github.com/openssl/openssl/pull/11635) --- crypto/param_build.c | 2 ++ 1 file changed, 2 insertions(+) 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); -- 2.25.1