summaryrefslogtreecommitdiffstats
path: root/crypto/bio/bss_conn.c
diff options
context:
space:
mode:
authorFdaSilvaYY <fdasilvayy@gmail.com>2018-04-26 12:06:17 -0400
committerRich Salz <rsalz@openssl.org>2018-04-26 12:27:46 -0400
commitf06080cb3da93e99755edb5f19e7ccc132aeba36 (patch)
tree5af1d6860ee8f6f8305a77190fa1f3bc4fcc336b /crypto/bio/bss_conn.c
parentd1f7a1e62a5b67b492f8e7eb48130bf00f9a3ab0 (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_conn.c')
-rw-r--r--crypto/bio/bss_conn.c4
1 files changed, 3 insertions, 1 deletions
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;