diff options
author | FdaSilvaYY <fdasilvayy@gmail.com> | 2018-04-26 12:06:17 -0400 |
---|---|---|
committer | Rich Salz <rsalz@openssl.org> | 2018-04-26 12:27:46 -0400 |
commit | f06080cb3da93e99755edb5f19e7ccc132aeba36 (patch) | |
tree | 5af1d6860ee8f6f8305a77190fa1f3bc4fcc336b /crypto/bio/bss_acpt.c | |
parent | d1f7a1e62a5b67b492f8e7eb48130bf00f9a3ab0 (diff) |
Add missing error code when alloc-return-null
Reviewed-by: Bernd Edlinger <bernd.edlinger@hotmail.de>
Reviewed-by: Rich Salz <rsalz@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/6085)
Diffstat (limited to 'crypto/bio/bss_acpt.c')
-rw-r--r-- | crypto/bio/bss_acpt.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/crypto/bio/bss_acpt.c b/crypto/bio/bss_acpt.c index 64cc452891..993e5903a0 100644 --- a/crypto/bio/bss_acpt.c +++ b/crypto/bio/bss_acpt.c @@ -92,8 +92,10 @@ static BIO_ACCEPT *BIO_ACCEPT_new(void) { BIO_ACCEPT *ret; - if ((ret = OPENSSL_zalloc(sizeof(*ret))) == NULL) + if ((ret = OPENSSL_zalloc(sizeof(*ret))) == NULL) { + BIOerr(BIO_F_BIO_ACCEPT_NEW, ERR_R_MALLOC_FAILURE); return NULL; + } ret->accept_family = BIO_FAMILY_IPANY; ret->accept_sock = (int)INVALID_SOCKET; return ret; |