Check malloc

Noticed by Claus Assmann <ca+ssl-dev@esmtp.org>

Reviewed-by: Richard Levitte <levitte@openssl.org>
This commit is contained in:
Rich Salz 2016-02-11 09:12:33 -05:00 committed by Rich Salz
parent 3577398360
commit 143e5e50f2

View File

@ -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;
}