Severity: LOW
Status: ✅ FIXED
Files: src/cmd/cmd.zig
const token = try token_buf.toOwnedSlice(allocator);
try arg_list.append(allocator, token);
Outer errdefer:1765 frees arg_list.items only. If append OOMs, token is owned but not in the list and token_buf was consumed — nothing frees it. Also lookup failure paths (UnknownCommand/MissingArgs) rely on that same errdefer, which is correct for listed tokens.
const token = try token_buf.toOwnedSlice(allocator);
arg_list.append(allocator, token) catch |e| { allocator.free(token); return e; };