From: Tomas Mraz Date: Wed, 7 Jun 2023 11:56:54 +0000 (+0200) Subject: Coverity 1528492: Fix possible memory leak if t == NULL X-Git-Tag: openssl-3.2.0-alpha1~669 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a33842efa51ca3f021310e10f444afef1e779fee;p=thirdparty%2Fopenssl.git Coverity 1528492: Fix possible memory leak if t == NULL --- diff --git a/crypto/asn1/a_time.c b/crypto/asn1/a_time.c index 4f51a6bc4ab..dd3724fc836 100644 --- a/crypto/asn1/a_time.c +++ b/crypto/asn1/a_time.c @@ -569,7 +569,7 @@ int ASN1_TIME_normalize(ASN1_TIME *t) { struct tm tm; - if (!ASN1_TIME_to_tm(t, &tm)) + if (t == NULL || !ASN1_TIME_to_tm(t, &tm)) return 0; return ossl_asn1_time_from_tm(t, &tm, V_ASN1_UNDEF) != NULL;