diff options
| -rw-r--r-- | sys/src/9/port/chan.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/sys/src/9/port/chan.c b/sys/src/9/port/chan.c index 262b0703d..d0d0ce4bb 100644 --- a/sys/src/9/port/chan.c +++ b/sys/src/9/port/chan.c @@ -1472,6 +1472,10 @@ namec(char *aname, int amode, int omode, ulong perm) /* save&update the name; domount might change c */ path = c->path; incref(path); + if(waserror()){ + pathclose(path); + nexterror(); + } m = nil; if(!nomount) domount(&c, &m, &path); @@ -1482,6 +1486,7 @@ namec(char *aname, int amode, int omode, ulong perm) /* now it's our copy anyway, we can put the name back */ pathclose(c->path); c->path = path; + poperror(); /* record whether c is on a mount point */ c->ismtpt = m!=nil; |
