From 45b6947f49e47a5aff2e2a93a1cca2bc913d869c Mon Sep 17 00:00:00 2001 From: dacctal Date: Sat, 18 Jul 2026 08:40:27 +0000 Subject: fix segfault in get_pkgsrc() with invalid str_fmt args --- src/pkg_remove.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'src/pkg_remove.c') diff --git a/src/pkg_remove.c b/src/pkg_remove.c index 3a0d0b2..20105c2 100644 --- a/src/pkg_remove.c +++ b/src/pkg_remove.c @@ -76,12 +76,10 @@ bool bldit_uninstall(package_t *pkg) { } lua_pushfstring(B, "%s", inst_dirs.prefix.data); lua_setglobal(B, "prefix"); - lua_pop(B, 1); if (!lua_try_table(B, "bldit.lua", "targets")) return false; bool target_success = target_uninstall(B, "bldit.lua", &pkg->target); - lua_pop(B, 2); - lua_close(B); + lua_pop(B, 1); return target_success; } @@ -176,7 +174,6 @@ void pkg_remove(package_t *pkg) { return; } - // TODO: refactor this nftw(pkg->src.data, remove_installed, 64, FTW_PHYS); const char *last_slash = strrchr(pkg->src.data, '/'); char target[MAX_PATH_LEN]; -- cgit v1.2.3