From f06080cb3da93e99755edb5f19e7ccc132aeba36 Mon Sep 17 00:00:00 2001 From: FdaSilvaYY Date: Thu, 26 Apr 2018 12:06:17 -0400 Subject: Add missing error code when alloc-return-null Reviewed-by: Bernd Edlinger Reviewed-by: Rich Salz (Merged from https://github.com/openssl/openssl/pull/6085) --- crypto/bio/bss_conn.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'crypto/bio/bss_conn.c') diff --git a/crypto/bio/bss_conn.c b/crypto/bio/bss_conn.c index c87b431cdb..e9673fe783 100644 --- a/crypto/bio/bss_conn.c +++ b/crypto/bio/bss_conn.c @@ -223,8 +223,10 @@ BIO_CONNECT *BIO_CONNECT_new(void) { BIO_CONNECT *ret; - if ((ret = OPENSSL_zalloc(sizeof(*ret))) == NULL) + if ((ret = OPENSSL_zalloc(sizeof(*ret))) == NULL) { + BIOerr(BIO_F_BIO_CONNECT_NEW, ERR_R_MALLOC_FAILURE); return NULL; + } ret->state = BIO_CONN_S_BEFORE; ret->connect_family = BIO_FAMILY_IPANY; return ret; -- cgit v1.2.3