Skip to content

Commit 4db5934

Browse files
authored
utils: use fclose when fstat failed(fluent#4762) (fluent#5741)
Signed-off-by: Takahiro Yamashita <[email protected]>
1 parent 37acacd commit 4db5934

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/flb_utils.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1171,7 +1171,7 @@ int flb_utils_read_file(char *path, char **out_buf, size_t *out_size)
11711171
ret = fstat(fd, &st);
11721172
if (ret == -1) {
11731173
flb_errno();
1174-
close(fd);
1174+
fclose(fp);
11751175
return -1;
11761176
}
11771177

0 commit comments

Comments
 (0)