From: Rich Salz Date: Thu, 11 Feb 2016 14:12:33 +0000 (-0500) Subject: Check malloc X-Git-Tag: OpenSSL_1_1_0-pre3~98 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=143e5e50f22eaff58e90dd20bdb66eae6ab3b53e;p=oweals%2Fopenssl.git Check malloc Noticed by Claus Assmann Reviewed-by: Richard Levitte --- 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; }