Skip to content

Commit

Permalink
in_exec_wasi: fix resource leak on exception (CID 508347) (#9208)
Browse files Browse the repository at this point in the history
Signed-off-by: Hiroshi Hatake <[email protected]>
  • Loading branch information
cosmo0920 authored Aug 14, 2024
1 parent 1781cbb commit 2223cc3
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions plugins/in_exec_wasi/in_exec_wasi.c
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ static int in_exec_wasi_collect(struct flb_input_instance *ins,

if (ctx->wasm_conf == NULL) {
flb_plg_error(ctx->ins, "wasm_conf cannot be NULL");
fclose(stdoutp);
return -1;
}
ctx->wasm_conf->stdoutfd = fileno(stdoutp);
Expand Down

0 comments on commit 2223cc3

Please sign in to comment.