From 62771d7f003c09166663b02f8d500b5cbec7dec9 Mon Sep 17 00:00:00 2001 From: Miklos Szeredi Date: Mon, 18 May 2015 16:55:20 +0200 Subject: [PATCH] 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. --- lib/fuse_lowlevel.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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) { -- 2.11.4.GIT