From 3178e6ea22cb8c74238acd8e298d1f3577618c0a Mon Sep 17 00:00:00 2001 From: Eduardo Silva Date: Mon, 26 Aug 2024 15:15:38 -0600 Subject: [PATCH] aws_util: release resource on exception (CID 507694 507588) Signed-off-by: Eduardo Silva --- src/aws/flb_aws_util.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/aws/flb_aws_util.c b/src/aws/flb_aws_util.c index 6ddd75b82d9..22862ba3cb1 100644 --- a/src/aws/flb_aws_util.c +++ b/src/aws/flb_aws_util.c @@ -1029,6 +1029,8 @@ size_t flb_aws_strftime_precision(char **out_buf, const char *time_format, tmp = gmtime_r(&tms->tm.tv_sec, ×tamp); if (!tmp) { + flb_free(tmp_parsed_time_str); + flb_free(buf); return 0; }