aboutsummaryrefslogtreecommitdiff
path: root/src/lib9p
diff options
context:
space:
mode:
authorrsc <devnull@localhost>2006-10-12 01:01:02 +0000
committerrsc <devnull@localhost>2006-10-12 01:01:02 +0000
commit729e53b9e55756f1b0475195489cf7309a2b80ac (patch)
tree0094810fca521be4d84589a03ddccad21cf51538 /src/lib9p
parent3fbe92ef1a2de9e8f470f66990a8637c0e29245b (diff)
downloadplan9port-729e53b9e55756f1b0475195489cf7309a2b80ac.tar.gz
plan9port-729e53b9e55756f1b0475195489cf7309a2b80ac.tar.bz2
plan9port-729e53b9e55756f1b0475195489cf7309a2b80ac.zip
correct ref counting in walkfile (Nemo)
Diffstat (limited to 'src/lib9p')
-rw-r--r--src/lib9p/file.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/src/lib9p/file.c b/src/lib9p/file.c
index 18b5b47f..a18b0923 100644
--- a/src/lib9p/file.c
+++ b/src/lib9p/file.c
@@ -232,21 +232,17 @@ File*
walkfile(File *f, char *path)
{
char *os, *s, *nexts;
- File *nf;
if(strchr(path, '/') == nil)
return walkfile1(f, path); /* avoid malloc */
os = s = estrdup9p(path);
- incref(&f->ref);
for(; *s; s=nexts){
if(nexts = strchr(s, '/'))
*nexts++ = '\0';
else
nexts = s+strlen(s);
- nf = walkfile1(f, s);
- decref(&f->ref);
- f = nf;
+ f = walkfile1(f, s);
if(f == nil)
break;
}