From 143e5e50f22eaff58e90dd20bdb66eae6ab3b53e Mon Sep 17 00:00:00 2001 From: Rich Salz Date: Thu, 11 Feb 2016 09:12:33 -0500 Subject: Check malloc Noticed by Claus Assmann Reviewed-by: Richard Levitte --- crypto/conf/conf_lib.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'crypto/conf/conf_lib.c') 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; } -- cgit v1.2.3