aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorGravatar Miklos Szeredi <mszeredi@suse.cz>2015-05-18 16:55:20 +0200
committerGravatar Miklos Szeredi <mszeredi@suse.cz>2015-05-18 16:55:20 +0200
commit62771d7f003c09166663b02f8d500b5cbec7dec9 (patch)
tree6229fac34119f192efbcb218df4d77f16dca575e /lib
parent1344908b6ce8b26ce9ff6e6269348eec904e14dc (diff)
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.
Diffstat (limited to 'lib')
-rwxr-xr-xlib/fuse_lowlevel.c4
1 files changed, 3 insertions, 1 deletions
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) {