close previous wd on kdebug cd

This commit is contained in:
Kevin Lange 2014-06-05 22:22:17 -07:00
parent 94c976a903
commit 4c199aa6b8

View File

@ -201,6 +201,7 @@ static int shell_cd(fs_node_t * tty, int argc, char * argv[]) {
if ((chd->flags & FS_DIRECTORY) == 0) {
return -1;
}
close_fs(chd);
free(current_process->wd_name);
current_process->wd_name = malloc(strlen(path) + 1);
memcpy(current_process->wd_name, path, strlen(path) + 1);