From: tb Date: Wed, 20 Mar 2024 21:21:03 +0000 (+0000) Subject: Make module_free() NULL safe X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=f06d15616a1868836f30e5b0a2268b32637434bc;p=openbsd Make module_free() NULL safe ok jsing --- 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); }