From b7a0ad8ffb1f673ee79fd0032c8283aaeb56e4bb Mon Sep 17 00:00:00 2001 From: apio Date: Tue, 18 Apr 2023 18:43:50 +0200 Subject: [PATCH] sh: Remove stray variable --- apps/sh.cpp | 4 ---- 1 file changed, 4 deletions(-) diff --git a/apps/sh.cpp b/apps/sh.cpp index 009b21b4..01d43793 100644 --- a/apps/sh.cpp +++ b/apps/sh.cpp @@ -69,8 +69,6 @@ Result luna_main(int argc, char** argv) if (!strncmp(cmd.chars(), "cd", 2)) { - char* copy = nullptr; - auto args = TRY(split_command_into_args(cmd.view())); check(args[0].view() == "cd"); @@ -78,12 +76,10 @@ Result luna_main(int argc, char** argv) { auto home = TRY(os::FileSystem::home_directory()); if (chdir(home.chars()) < 0) perror("cd"); - free(copy); continue; } if (chdir(args[1].chars()) < 0) perror("cd"); - free(copy); continue; }