From 45457d4471ed7f2c439b216386810ca73a9e0d9d Mon Sep 17 00:00:00 2001 From: David Korczynski Date: Tue, 8 Aug 2023 11:34:30 -0700 Subject: [PATCH] in_exec_wasi: fix possible file descriptor leak Signed-off-by: David Korczynski --- plugins/in_exec_wasi/in_exec_wasi.c | 1 + 1 file changed, 1 insertion(+) diff --git a/plugins/in_exec_wasi/in_exec_wasi.c b/plugins/in_exec_wasi/in_exec_wasi.c index 704af9037a6..bf765430ddb 100644 --- a/plugins/in_exec_wasi/in_exec_wasi.c +++ b/plugins/in_exec_wasi/in_exec_wasi.c @@ -68,6 +68,7 @@ static int in_exec_wasi_collect(struct flb_input_instance *ins, if (ctx->oneshot == FLB_TRUE) { ret = flb_pipe_r(ctx->ch_manager[0], &val, sizeof(val)); if (ret == -1) { + fclose(stdoutp); flb_errno(); return -1; }