mirror of
https://mzte.de/git/LordMZTE/dotfiles.git
synced 2024-11-18 07:53:46 +01:00
fix mzte_nv resource leak
This commit is contained in:
parent
e38661a2af
commit
1cc31f80d8
1 changed files with 3 additions and 2 deletions
|
@ -32,7 +32,8 @@ const runtime_map = [_]Runtime{
|
|||
};
|
||||
|
||||
fn lFindRuntimes(l: *c.lua_State) !c_int {
|
||||
const jvmdir = try std.fs.openIterableDirAbsolute("/usr/lib/jvm/", .{});
|
||||
var jvmdir = try std.fs.openIterableDirAbsolute("/usr/lib/jvm/", .{});
|
||||
defer jvmdir.close();
|
||||
|
||||
c.lua_newtable(l);
|
||||
|
||||
|
@ -47,7 +48,7 @@ fn lFindRuntimes(l: *c.lua_State) !c_int {
|
|||
if (!std.mem.containsAtLeast(u8, jvm.name, 1, rt.version))
|
||||
continue;
|
||||
|
||||
// push a table with a name field (must be a V from runtime_map)
|
||||
// push a table with a name field (must be a name from runtime_map)
|
||||
// and a path field (path to the runtime's home)
|
||||
c.lua_newtable(l);
|
||||
|
||||
|
|
Loading…
Reference in a new issue