summaryrefslogtreecommitdiffstats
path: root/crypto/asn1
diff options
context:
space:
mode:
authorTomas Mraz <tomas@openssl.org>2023-06-07 13:56:54 +0200
committerTodd Short <todd.short@me.com>2023-06-10 19:23:59 -0400
commita33842efa51ca3f021310e10f444afef1e779fee (patch)
tree201a0c0044a08d23644d0dd90c06ed2e56caf7fe /crypto/asn1
parentf9a4e2b663ab97de718e016b29644d0c2bd9b7c3 (diff)
Coverity 1528492: Fix possible memory leak if t == NULL
Diffstat (limited to 'crypto/asn1')
-rw-r--r--crypto/asn1/a_time.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/crypto/asn1/a_time.c b/crypto/asn1/a_time.c
index 4f51a6bc4a..dd3724fc83 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;