From 90945fa31a42dcf3beb90540c618e4d627c595ea Mon Sep 17 00:00:00 2001 From: Matt Caswell Date: Fri, 30 Oct 2015 11:12:26 +0000 Subject: Continue standardising malloc style for libcrypto Continuing from previous commit ensure our style is consistent for malloc return checks. Reviewed-by: Kurt Roeckx --- crypto/x509/x_name.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'crypto/x509/x_name.c') diff --git a/crypto/x509/x_name.c b/crypto/x509/x_name.c index f52b91f..2895734 100644 --- a/crypto/x509/x_name.c +++ b/crypto/x509/x_name.c @@ -135,7 +135,7 @@ static int x509_name_ex_new(ASN1_VALUE **val, const ASN1_ITEM *it) { X509_NAME *ret = OPENSSL_zalloc(sizeof(*ret)); - if (!ret) + if (ret == NULL) goto memerr; if ((ret->entries = sk_X509_NAME_ENTRY_new_null()) == NULL) goto memerr; @@ -361,7 +361,7 @@ static int x509_name_canon(X509_NAME *a) set = entry->set; } tmpentry = X509_NAME_ENTRY_new(); - if (!tmpentry) + if (tmpentry == NULL) goto err; tmpentry->object = OBJ_dup(entry->object); if (!asn1_string_canon(tmpentry->value, entry->value)) @@ -377,7 +377,7 @@ static int x509_name_canon(X509_NAME *a) p = OPENSSL_malloc(a->canon_enclen); - if (!p) + if (p == NULL) goto err; a->canon_enc = p; -- cgit v1.1