summaryrefslogtreecommitdiff
path: root/core/src/xmake/binutils/elf
diff options
context:
space:
mode:
authorruki <[email protected]>2026-07-18 21:54:50 +0800
committerruki <[email protected]>2026-07-18 21:54:50 +0800
commitcfebf2a690e1a0ad2255f64eec5bec43eeac0049 (patch)
tree5659e0542966061f573bf5d948a664ec7605fa73 /core/src/xmake/binutils/elf
parent0641a99d357d99e96da49c22cb7d52be5f81c83f (diff)
fix mem leaks
Diffstat (limited to 'core/src/xmake/binutils/elf')
-rw-r--r--core/src/xmake/binutils/elf/bin2elf.c6
1 files changed, 3 insertions, 3 deletions
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;