From f06d15616a1868836f30e5b0a2268b32637434bc Mon Sep 17 00:00:00 2001 From: tb Date: Wed, 20 Mar 2024 21:21:03 +0000 Subject: [PATCH] Make module_free() NULL safe ok jsing --- lib/libcrypto/conf/conf_mod.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/libcrypto/conf/conf_mod.c b/lib/libcrypto/conf/conf_mod.c index aab108a2602..f1a88c92b3d 100644 --- a/lib/libcrypto/conf/conf_mod.c +++ b/lib/libcrypto/conf/conf_mod.c @@ -1,4 +1,4 @@ -/* $OpenBSD: conf_mod.c,v 1.28 2023/07/20 15:05:30 tb Exp $ */ +/* $OpenBSD: conf_mod.c,v 1.29 2024/03/20 21:21:03 tb Exp $ */ /* Written by Stephen Henson (steve@openssl.org) for the OpenSSL * project 2001. */ @@ -364,6 +364,9 @@ CONF_modules_unload(int all) static void module_free(CONF_MODULE *md) { + if (md == NULL) + return; + free(md->name); free(md); } -- 2.20.1