diff --git a/sysfile.c b/sysfile.c index b5d2337..ecddd2b 100644 --- a/sysfile.c +++ b/sysfile.c @@ -252,7 +252,7 @@ sys_chdir(void) if((ip = namei(path, NAMEI_LOOKUP, 0, 0, 0)) == 0) return -1; - if(ip == p->cwd) { + if(ip == cp->cwd) { iput(ip); return 0; }