From: Miklos Szeredi Date: Mon, 18 May 2015 14:55:20 +0000 (+0200) Subject: libfuse: get ref for req X-Git-Tag: fuse-3.0.0pre0~70^2~1 X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=62771d7f003c09166663b02f8d500b5cbec7dec9;p=qemu-gpiodev%2Flibfuse.git libfuse: get ref for req While the request lives don't free the channel associated with the request, the answer will need to be written on the channel. --- diff --git a/lib/fuse_lowlevel.c b/lib/fuse_lowlevel.c index e70733a..8433e0a 100755 --- a/lib/fuse_lowlevel.c +++ b/lib/fuse_lowlevel.c @@ -134,6 +134,8 @@ void fuse_free_req(fuse_req_t req) req->u.ni.data = NULL; list_del_req(req); ctr = --req->ctr; + fuse_chan_put(req->ch); + req->ch = NULL; pthread_mutex_unlock(&f->lock); if (!ctr) destroy_req(req); @@ -2538,7 +2540,7 @@ void fuse_session_process_buf(struct fuse_session *se, req->ctx.uid = in->uid; req->ctx.gid = in->gid; req->ctx.pid = in->pid; - req->ch = ch; + req->ch = fuse_chan_get(ch); err = EIO; if (!f->got_init) {