mirror of
https://github.com/openssl/openssl.git
synced 2025-01-18 13:44:20 +08:00
Check for failed malloc in BIO_ADDR_new
BIO_ADDR_new() calls OPENSSL_zalloc() which can fail - but the return value is not checked. Reviewed-by: Rich Salz <rsalz@openssl.org>
This commit is contained in:
parent
ed3eb5e0cc
commit
138388fe33
@ -83,6 +83,9 @@ BIO_ADDR *BIO_ADDR_new(void)
|
||||
{
|
||||
BIO_ADDR *ret = OPENSSL_zalloc(sizeof(*ret));
|
||||
|
||||
if (ret == NULL)
|
||||
return NULL;
|
||||
|
||||
ret->sa.sa_family = AF_UNSPEC;
|
||||
return ret;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user