Skip to content

Commit c52c811

Browse files
mabrarovedsiper
authored andcommitted
pipeline: inputs: podman_metrics: fixed use after free which was discovered by failed CI builds (after migration from GCC 7 to GCC 9 in #10230).
Signed-off-by: Marat Abrarov <[email protected]>
1 parent 07a8d36 commit c52c811

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

plugins/in_podman_metrics/podman_metrics.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -231,12 +231,11 @@ static int create_counter(struct flb_in_metrics *ctx, struct cmt_counter **count
231231

232232
}
233233

234+
labels = (char *[]){id, name, image_name, interface};
234235
if (interface == NULL) {
235-
labels = (char *[]){id, name, image_name};
236236
label_count = 3;
237237
}
238238
else {
239-
labels = (char *[]){id, name, image_name, interface};
240239
label_count = 4;
241240
}
242241

0 commit comments

Comments
 (0)