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>
diff --git a/ssl/d1_lib.c b/ssl/d1_lib.c
index b865ad4..6e70c56 100644
--- a/ssl/d1_lib.c
+++ b/ssl/d1_lib.c
@@ -155,7 +155,7 @@
d1->link_mtu = 0;
d1->mtu = 0;
- if (!d1->buffered_messages || !d1->sent_messages) {
+ if (d1->buffered_messages == NULL || d1->sent_messages == NULL) {
pqueue_free(d1->buffered_messages);
pqueue_free(d1->sent_messages);
OPENSSL_free(d1);