tlib9p: fix Tattach ref count bug - plan9port - [fork] Plan 9 from user space
HTML git clone git://src.adamsgaard.dk/plan9port
DIR Log
DIR Files
DIR Refs
DIR README
DIR LICENSE
---
DIR commit 845f6bce384affec3885e34dcb0358fb6653017f
DIR parent d630b67e2530b5ee94710cc931db73d7a9c97225
HTML Author: Russ Cox <rsc@swtch.com>
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(-)
---
DIR 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;
}