Skip to content

Commit 2c8aa36

Browse files
committed
in_prometheus_scrape: release context if upstream context fails
Signed-off-by: Eduardo Silva <[email protected]>
1 parent 2f755a8 commit 2c8aa36

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

plugins/in_prometheus_scrape/prom_scrape.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,7 @@ static struct prom_scrape *prom_scrape_create(struct flb_input_instance *ins,
6565

6666
if (!upstream) {
6767
flb_plg_error(ins, "upstream initialization error");
68+
flb_free(ctx);
6869
return NULL;
6970
}
7071
ctx->upstream = upstream;

0 commit comments

Comments
 (0)