aboutsummaryrefslogtreecommitdiff
path: root/ssl/statem/statem_dtls.c
diff options
context:
space:
mode:
authorMatt Caswell <matt@openssl.org>2015-10-30 10:05:53 +0000
committerMatt Caswell <matt@openssl.org>2015-11-09 22:48:41 +0000
commita71edf3ba275b946224b5bcded0a8ecfce1855c0 (patch)
tree85257ad90882fc4d8d8f73cd91a03b7cc476b9d2 /ssl/statem/statem_dtls.c
parent3457e7a087a643cb65d67d9d72ec5983a02f5dfe (diff)
downloadopenssl-a71edf3ba275b946224b5bcded0a8ecfce1855c0.zip
openssl-a71edf3ba275b946224b5bcded0a8ecfce1855c0.tar.gz
openssl-a71edf3ba275b946224b5bcded0a8ecfce1855c0.tar.bz2
Standardise our style for checking malloc failures
if we have a malloc |x = OPENSSL_malloc(...)| sometimes we check |x| for NULL and sometimes we treat it as a boolean |if(!x) ...|. Standardise the approach in libssl. Reviewed-by: Kurt Roeckx <kurt@openssl.org>
Diffstat (limited to 'ssl/statem/statem_dtls.c')
-rw-r--r--ssl/statem/statem_dtls.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/ssl/statem/statem_dtls.c b/ssl/statem/statem_dtls.c
index 58a0959..aafd28f 100644
--- a/ssl/statem/statem_dtls.c
+++ b/ssl/statem/statem_dtls.c
@@ -1075,7 +1075,7 @@ int dtls1_buffer_message(SSL *s, int is_ccs)
OPENSSL_assert(s->init_off == 0);
frag = dtls1_hm_fragment_new(s->init_num, 0);
- if (!frag)
+ if (frag == NULL)
return 0;
memcpy(frag->fragment, s->init_buf->data, s->init_num);