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
1 changed files with 3 additions and 0 deletions
|
@ -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 a new issue