summaryrefslogtreecommitdiffstats
path: root/crypto/bio/b_addr.c
diff options
context:
space:
mode:
authorJ Mohan Rao Arisankala <mohan@barracuda.com>2016-05-05 23:43:32 +0530
committerMatt Caswell <matt@openssl.org>2016-05-09 09:06:06 +0100
commitcb1d435cac2a9a7bd6019f9f23648c8075251109 (patch)
tree37af32e7b67b0871d5542ac223bddfb66058f936 /crypto/bio/b_addr.c
parent5cf14ce074dfd1780ae4c68b2e7f083bfaf47530 (diff)
few missing allocation failure checks and releases on error paths
- Missing checks for allocation failure. - releasing memory in few missing error paths Reviewed-by: Kurt Roeckx <kurt@openssl.org> Reviewed-by: Matt Caswell <matt@openssl.org>
Diffstat (limited to 'crypto/bio/b_addr.c')
-rw-r--r--crypto/bio/b_addr.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/crypto/bio/b_addr.c b/crypto/bio/b_addr.c
index 86c6c7eca8..1813f5a9bb 100644
--- a/crypto/bio/b_addr.c
+++ b/crypto/bio/b_addr.c
@@ -83,8 +83,10 @@ BIO_ADDR *BIO_ADDR_new(void)
{
BIO_ADDR *ret = OPENSSL_zalloc(sizeof(*ret));
- if (ret == NULL)
+ if (ret == NULL) {
+ BIOerr(BIO_F_BIO_ADDR_NEW, ERR_R_MALLOC_FAILURE);
return NULL;
+ }
ret->sa.sa_family = AF_UNSPEC;
return ret;