Skip to content

Commit 667e50e

Browse files
cosmo0920edsiper
authored andcommitted
in_podman_metrics: Plug a resource leak on exception (CID 507805)
Signed-off-by: Hiroshi Hatake <[email protected]>
1 parent 665e4a0 commit 667e50e

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

plugins/in_podman_metrics/podman_metrics_data.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -287,6 +287,7 @@ int collect_sysfs_directories(struct flb_in_metrics *ctx, flb_sds_t name)
287287
pth = flb_malloc(sizeof(struct sysfs_path));
288288
if (!pth) {
289289
flb_errno();
290+
closedir(dir);
290291
return -1;
291292
}
292293
pth->path = flb_sds_create(path);

0 commit comments

Comments
 (0)