Skip to content

Commit a197ee4

Browse files
committed
aws_util: fix failing sanitizer builds
Signed-off-by: Wesley Pettit <wppttt@amazon.com>
1 parent 9c4646a commit a197ee4

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/aws/flb_aws_util.c

+3-1
Original file line numberDiff line numberDiff line change
@@ -720,6 +720,7 @@ flb_sds_t flb_get_s3_key(const char *format, time_t time, const char *tag, char
720720
flb_sds_t tmp_key = NULL;
721721
flb_sds_t tmp_tag = NULL;
722722
struct tm *gmt = NULL;
723+
struct flb_sds *head = NULL;
723724

724725
if (strlen(format) > S3_KEY_SIZE){
725726
flb_warn("[s3_key] Object key length is longer than the 1024 character limit.");
@@ -832,7 +833,8 @@ flb_sds_t flb_get_s3_key(const char *format, time_t time, const char *tag, char
832833

833834
flb_sds_destroy(s3_key);
834835
s3_key = tmp;
835-
FLB_SDS_HEADER(s3_key)->len = strlen(s3_key);
836+
head = FLB_SDS_HEADER(s3_key);
837+
head->len = strlen(s3_key);
836838

837839
flb_sds_destroy(tmp_tag);
838840
return s3_key;

0 commit comments

Comments
 (0)