From cfebf2a690e1a0ad2255f64eec5bec43eeac0049 Mon Sep 17 00:00:00 2001 From: ruki Date: Sat, 18 Jul 2026 21:54:50 +0800 Subject: fix mem leaks --- core/src/xmake/binutils/elf/bin2elf.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'core/src/xmake/binutils/elf') diff --git a/core/src/xmake/binutils/elf/bin2elf.c b/core/src/xmake/binutils/elf/bin2elf.c index ad580ba84..585ddc681 100644 --- a/core/src/xmake/binutils/elf/bin2elf.c +++ b/core/src/xmake/binutils/elf/bin2elf.c @@ -94,7 +94,7 @@ static tb_bool_t xm_binutils_bin2elf_read_refobj(tb_char_t const *refobj, ok = tb_true; } while (0); - if (stream) tb_stream_clos(stream); + if (stream) tb_stream_exit(stream); return ok; } @@ -791,11 +791,11 @@ tb_int_t xm_binutils_bin2elf(lua_State *lua) { } while (0); if (istream) - tb_stream_clos(istream); + tb_stream_exit(istream); istream = tb_null; if (ostream) - tb_stream_clos(ostream); + tb_stream_exit(ostream); ostream = tb_null; return ok ? 1 : 2; -- cgit v1.3.1