From 673692b8d62c8014b70c609caf69a251608303a9 Mon Sep 17 00:00:00 2001 From: FdaSilvaYY Date: Sat, 6 Apr 2019 19:16:59 +1000 Subject: Coverity: fix two minor NPD issues. Found by Coverity. Reviewed-by: Matt Caswell Reviewed-by: Tim Hudson Reviewed-by: Paul Dale (Merged from https://github.com/openssl/openssl/pull/8274) (cherry picked from commit 23dc8feba817560485da00d690d7b7b9e5b15682) --- crypto/conf/conf_lib.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'crypto/conf') diff --git a/crypto/conf/conf_lib.c b/crypto/conf/conf_lib.c index 0b7dd26d63..c278d87091 100644 --- a/crypto/conf/conf_lib.c +++ b/crypto/conf/conf_lib.c @@ -356,8 +356,10 @@ OPENSSL_INIT_SETTINGS *OPENSSL_INIT_new(void) { OPENSSL_INIT_SETTINGS *ret = malloc(sizeof(*ret)); - if (ret != NULL) - memset(ret, 0, sizeof(*ret)); + if (ret == NULL) + return NULL; + + memset(ret, 0, sizeof(*ret)); ret->flags = DEFAULT_CONF_MFLAGS; return ret; -- cgit v1.2.3