X-Git-Url: https://git.openssl.org/?p=openssl.git;a=blobdiff_plain;f=crypto%2Fasn1%2Ftasn_new.c;h=668f6419d1cb63b00945937642098a7d3c815f81;hp=6a2ad62d70c37d9f9206e0f8d1577e654ec9e62b;hb=90945fa31a42dcf3beb90540c618e4d627c595ea;hpb=a71edf3ba275b946224b5bcded0a8ecfce1855c0 diff --git a/crypto/asn1/tasn_new.c b/crypto/asn1/tasn_new.c index 6a2ad62d70..668f6419d1 100644 --- a/crypto/asn1/tasn_new.c +++ b/crypto/asn1/tasn_new.c @@ -147,7 +147,7 @@ int asn1_item_embed_new(ASN1_VALUE **pval, const ASN1_ITEM *it, int embed) memset(*pval, 0, it->size); } else { *pval = OPENSSL_zalloc(it->size); - if (!*pval) + if (*pval == NULL) goto memerr; } asn1_set_choice_selector(pval, -1, it); @@ -173,7 +173,7 @@ int asn1_item_embed_new(ASN1_VALUE **pval, const ASN1_ITEM *it, int embed) memset(*pval, 0, it->size); } else { *pval = OPENSSL_zalloc(it->size); - if (!*pval) + if (*pval == NULL) goto memerr; } asn1_do_lock(pval, 0, it); @@ -341,7 +341,7 @@ static int asn1_primitive_new(ASN1_VALUE **pval, const ASN1_ITEM *it, case V_ASN1_ANY: typ = OPENSSL_malloc(sizeof(*typ)); - if (!typ) + if (typ == NULL) return 0; typ->value.ptr = NULL; typ->type = -1;