diff options
author | Matt Caswell <matt@openssl.org> | 2015-10-30 10:05:53 +0000 |
---|---|---|
committer | Matt Caswell <matt@openssl.org> | 2015-11-09 22:48:41 +0000 |
commit | a71edf3ba275b946224b5bcded0a8ecfce1855c0 (patch) | |
tree | 85257ad90882fc4d8d8f73cd91a03b7cc476b9d2 /ssl/ssl_sess.c | |
parent | 3457e7a087a643cb65d67d9d72ec5983a02f5dfe (diff) | |
download | openssl-a71edf3ba275b946224b5bcded0a8ecfce1855c0.tar.gz |
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/ssl_sess.c')
-rw-r--r-- | ssl/ssl_sess.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/ssl/ssl_sess.c b/ssl/ssl_sess.c index 6f46b9f37e..964274600c 100644 --- a/ssl/ssl_sess.c +++ b/ssl/ssl_sess.c @@ -1009,7 +1009,7 @@ int SSL_set_session_ticket_ext(SSL *s, void *ext_data, int ext_len) s->tlsext_session_ticket = NULL; s->tlsext_session_ticket = OPENSSL_malloc(sizeof(TLS_SESSION_TICKET_EXT) + ext_len); - if (!s->tlsext_session_ticket) { + if (s->tlsext_session_ticket == NULL) { SSLerr(SSL_F_SSL_SET_SESSION_TICKET_EXT, ERR_R_MALLOC_FAILURE); return 0; } |