Skip to content

Commit 6a8d76a

Browse files
cosmo0920scne59
authored andcommitted
wasm: Plug a resource leak on exception (CID 508177) (fluent#9615)
Signed-off-by: Hiroshi Hatake <[email protected]>
1 parent 8a5e61e commit 6a8d76a

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/wasm/flb_wasm.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -168,6 +168,8 @@ struct flb_wasm *flb_wasm_instantiate(struct flb_config *config, const char *was
168168

169169
if (!wasm_runtime_full_init(&wasm_args)) {
170170
flb_error("Init runtime environment failed.");
171+
flb_free(fw);
172+
171173
return NULL;
172174
}
173175

0 commit comments

Comments
 (0)