summaryrefslogtreecommitdiffstats
path: root/crypto/conf/conf_lib.c
diff options
context:
space:
mode:
authorRich Salz <rsalz@akamai.com>2016-02-11 09:12:33 -0500
committerRich Salz <rsalz@openssl.org>2016-02-11 09:21:35 -0500
commit143e5e50f22eaff58e90dd20bdb66eae6ab3b53e (patch)
treead723f33eb67174120d31ce85e9432d5858e2234 /crypto/conf/conf_lib.c
parent3577398360ba38a7dbfbedd8db9ebdd8eadce062 (diff)
Check malloc
Noticed by Claus Assmann <ca+ssl-dev@esmtp.org> Reviewed-by: Richard Levitte <levitte@openssl.org>
Diffstat (limited to 'crypto/conf/conf_lib.c')
-rw-r--r--crypto/conf/conf_lib.c3
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;
}