Skip to content

Commit

Permalink
in_podman_metrics: Plug a resource leak on exception (CID 507805)
Browse files Browse the repository at this point in the history
Signed-off-by: Hiroshi Hatake <[email protected]>
  • Loading branch information
cosmo0920 authored and edsiper committed Aug 29, 2024
1 parent 665e4a0 commit 667e50e
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions plugins/in_podman_metrics/podman_metrics_data.c
Original file line number Diff line number Diff line change
Expand Up @@ -287,6 +287,7 @@ int collect_sysfs_directories(struct flb_in_metrics *ctx, flb_sds_t name)
pth = flb_malloc(sizeof(struct sysfs_path));
if (!pth) {
flb_errno();
closedir(dir);
return -1;
}
pth->path = flb_sds_create(path);
Expand Down

0 comments on commit 667e50e

Please sign in to comment.