tlib9p: fix Tattach ref count bug - plan9port - [fork] Plan 9 from user space | |
git clone git://src.adamsgaard.dk/plan9port | |
Log | |
Files | |
Refs | |
README | |
LICENSE | |
--- | |
commit 845f6bce384affec3885e34dcb0358fb6653017f | |
parent d630b67e2530b5ee94710cc931db73d7a9c97225 | |
Author: Russ Cox <[email protected]> | |
Date: Mon, 4 Feb 2008 15:34:00 -0500 | |
lib9p: fix Tattach ref count bug | |
Diffstat: | |
M src/lib9p/srv.c | 2 +- | |
1 file changed, 1 insertion(+), 1 deletion(-) | |
--- | |
diff --git a/src/lib9p/srv.c b/src/lib9p/srv.c | |
t@@ -227,7 +227,7 @@ sattach(Srv *srv, Req *r) | |
r->fid->uid = estrdup9p(r->ifcall.uname); | |
if(srv->tree){ | |
r->fid->file = srv->tree->root; | |
- /* BUG? incref(r->fid->file) ??? */ | |
+ incref(&r->fid->file->ref); | |
r->ofcall.qid = r->fid->file->dir.qid; | |
r->fid->qid = r->ofcall.qid; | |
} |