From 7e7530d1b1661a0a6f7acc94129d6bf61206c82d Mon Sep 17 00:00:00 2001 From: Miklos Szeredi Date: Wed, 14 Sep 2005 15:20:26 +0000 Subject: fix --- lib/fuse_loop_mt.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'lib/fuse_loop_mt.c') diff --git a/lib/fuse_loop_mt.c b/lib/fuse_loop_mt.c index 478aae7..c0828f7 100644 --- a/lib/fuse_loop_mt.c +++ b/lib/fuse_loop_mt.c @@ -68,6 +68,7 @@ static void *do_work(void *data) return NULL; } + pthread_cleanup_push(free, buf); pthread_setcancelstate(PTHREAD_CANCEL_ENABLE, NULL); pthread_setcanceltype(PTHREAD_CANCEL_ASYNCHRONOUS, NULL); @@ -99,6 +100,7 @@ static void *do_work(void *data) pthread_mutex_unlock(&w->lock); fuse_session_process(w->se, buf, res, w->ch); } + pthread_cleanup_pop(1); /* Wait for cancellation */ if (!is_mainthread) -- cgit v1.2.3