remove memleak when getting args
This commit is contained in:
parent
0cd47be7ac
commit
9527426d48
1 changed files with 2 additions and 2 deletions
|
@ -242,9 +242,9 @@ pub fn main() !void {
|
|||
var args_it = std.process.args();
|
||||
|
||||
// TODO print help
|
||||
|
||||
_ = try (args_it.next(allocator) orelse @panic("expected exe name"));
|
||||
_ = args_it.skip();
|
||||
const scri_path = try (args_it.next(allocator) orelse @panic("expected scri path or 'repl'"));
|
||||
defer allocator.free(scri_path);
|
||||
|
||||
if (std.mem.eql(u8, scri_path, "repl")) {
|
||||
return try doRepl(allocator, &args_it);
|
||||
|
|
Loading…
Reference in a new issue