diff options
author | Theo Buehler <tb@cvs.openbsd.org> | 2024-03-20 21:21:04 +0000 |
---|---|---|
committer | Theo Buehler <tb@cvs.openbsd.org> | 2024-03-20 21:21:04 +0000 |
commit | efe9cf67c50e98fa03ff41640ae7988d68a51e90 (patch) | |
tree | 122103b3e7a2c809df6954639ca55a81d7de2008 | |
parent | d85495dface090a6fb4eba2ac247d42573910a53 (diff) |
Make module_free() NULL safe
ok jsing
-rw-r--r-- | lib/libcrypto/conf/conf_mod.c | 5 |
1 files changed, 4 insertions, 1 deletions
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); } |