Skip to content

Commit

Permalink
Coverity 1528492: Fix possible memory leak if t == NULL
Browse files Browse the repository at this point in the history
  • Loading branch information
t8m authored and tmshort committed Jun 10, 2023
1 parent f9a4e2b commit a33842e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion crypto/asn1/a_time.c
Expand Up @@ -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;
Expand Down

0 comments on commit a33842e

Please sign in to comment.