diff options
Diffstat (limited to '')
| -rw-r--r-- | src/lib/libcrypto/asn1/a_time_tm.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/lib/libcrypto/asn1/a_time_tm.c b/src/lib/libcrypto/asn1/a_time_tm.c index db9382502f..5be2ff0af2 100644 --- a/src/lib/libcrypto/asn1/a_time_tm.c +++ b/src/lib/libcrypto/asn1/a_time_tm.c | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | /* $OpenBSD: a_time_tm.c,v 1.18 2021/08/28 08:22:48 tb Exp $ */ | 1 | /* $OpenBSD: a_time_tm.c,v 1.19 2022/03/31 13:04:47 tb Exp $ */ |
| 2 | /* | 2 | /* |
| 3 | * Copyright (c) 2015 Bob Beck <beck@openbsd.org> | 3 | * Copyright (c) 2015 Bob Beck <beck@openbsd.org> |
| 4 | * | 4 | * |
| @@ -259,7 +259,7 @@ ASN1_TIME_adj_internal(ASN1_TIME *s, time_t t, int offset_day, long offset_sec, | |||
| 259 | int allocated = 0; | 259 | int allocated = 0; |
| 260 | struct tm tm; | 260 | struct tm tm; |
| 261 | size_t len; | 261 | size_t len; |
| 262 | char * p; | 262 | char *p; |
| 263 | 263 | ||
| 264 | if (gmtime_r(&t, &tm) == NULL) | 264 | if (gmtime_r(&t, &tm) == NULL) |
| 265 | return (NULL); | 265 | return (NULL); |
| @@ -288,8 +288,10 @@ ASN1_TIME_adj_internal(ASN1_TIME *s, time_t t, int offset_day, long offset_sec, | |||
| 288 | } | 288 | } |
| 289 | 289 | ||
| 290 | if (s == NULL) { | 290 | if (s == NULL) { |
| 291 | if ((s = ASN1_TIME_new()) == NULL) | 291 | if ((s = ASN1_TIME_new()) == NULL) { |
| 292 | free(p); | ||
| 292 | return (NULL); | 293 | return (NULL); |
| 294 | } | ||
| 293 | allocated = 1; | 295 | allocated = 1; |
| 294 | } | 296 | } |
| 295 | 297 | ||
