diff options
author | FdaSilvaYY <fdasilvayy@gmail.com> | 2019-04-06 19:16:59 +1000 |
---|---|---|
committer | Tomas Mraz <tmraz@fedoraproject.org> | 2020-03-20 13:31:21 +0100 |
commit | 673692b8d62c8014b70c609caf69a251608303a9 (patch) | |
tree | 1f9a69cad4656b081ac8db3b1125523e776f7e96 /crypto/conf | |
parent | c3074077136c698af05ebe57347c186ae15c910a (diff) |
Coverity: fix two minor NPD issues.
Found by Coverity.
Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Tim Hudson <tjh@openssl.org>
Reviewed-by: Paul Dale <paul.dale@oracle.com>
(Merged from https://github.com/openssl/openssl/pull/8274)
(cherry picked from commit 23dc8feba817560485da00d690d7b7b9e5b15682)
Diffstat (limited to 'crypto/conf')
-rw-r--r-- | crypto/conf/conf_lib.c | 6 |
1 files changed, 4 insertions, 2 deletions
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; |