diff options
author | Rich Salz <rsalz@akamai.com> | 2016-02-11 09:12:33 -0500 |
---|---|---|
committer | Rich Salz <rsalz@openssl.org> | 2016-02-11 09:21:35 -0500 |
commit | 143e5e50f22eaff58e90dd20bdb66eae6ab3b53e (patch) | |
tree | ad723f33eb67174120d31ce85e9432d5858e2234 | |
parent | 3577398360ba38a7dbfbedd8db9ebdd8eadce062 (diff) |
Check malloc
Noticed by Claus Assmann <ca+ssl-dev@esmtp.org>
Reviewed-by: Richard Levitte <levitte@openssl.org>
-rw-r--r-- | crypto/conf/conf_lib.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/crypto/conf/conf_lib.c b/crypto/conf/conf_lib.c index 29357b26ad..a84b643fc2 100644 --- a/crypto/conf/conf_lib.c +++ b/crypto/conf/conf_lib.c @@ -381,7 +381,8 @@ OPENSSL_INIT_SETTINGS *OPENSSL_INIT_new(void) { OPENSSL_INIT_SETTINGS *ret = malloc(sizeof(*ret)); - memset(ret, 0, sizeof(*ret)); + if (ret != NULL) + memset(ret, 0, sizeof(*ret)); return ret; } |