summaryrefslogtreecommitdiffstats
path: root/crypto/bio/bss_dgram.c
diff options
context:
space:
mode:
authorMatt Caswell <matt@openssl.org>2015-10-30 11:12:26 +0000
committerMatt Caswell <matt@openssl.org>2015-11-09 22:48:41 +0000
commit90945fa31a42dcf3beb90540c618e4d627c595ea (patch)
treee73870c253abf0c37ca618384e30a7937a996b55 /crypto/bio/bss_dgram.c
parenta71edf3ba275b946224b5bcded0a8ecfce1855c0 (diff)
Continue standardising malloc style for libcrypto
Continuing from previous commit ensure our style is consistent for malloc return checks. Reviewed-by: Kurt Roeckx <kurt@openssl.org>
Diffstat (limited to 'crypto/bio/bss_dgram.c')
-rw-r--r--crypto/bio/bss_dgram.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/crypto/bio/bss_dgram.c b/crypto/bio/bss_dgram.c
index 9c6af4bc9d..0975856d59 100644
--- a/crypto/bio/bss_dgram.c
+++ b/crypto/bio/bss_dgram.c
@@ -997,7 +997,7 @@ BIO *BIO_new_dgram_sctp(int fd, int close_flag)
*/
sockopt_len = (socklen_t) (sizeof(sctp_assoc_t) + 256 * sizeof(uint8_t));
authchunks = OPENSSL_zalloc(sockopt_len);
- if (!authchunks) {
+ if (authchunks == NULL) {
BIO_vfree(bio);
return (NULL);
}
@@ -1334,7 +1334,7 @@ static int dgram_sctp_read(BIO *b, char *out, int outl)
optlen =
(socklen_t) (sizeof(sctp_assoc_t) + 256 * sizeof(uint8_t));
authchunks = OPENSSL_malloc(optlen);
- if (!authchunks) {
+ if (authchunks == NULL) {
BIOerr(BIO_F_DGRAM_SCTP_READ, ERR_R_MALLOC_FAILURE);
return -1;
}