aboutsummaryrefslogtreecommitdiff
path: root/lib/fuse_loop_mt.c
diff options
context:
space:
mode:
authorGravatar Miklos Szeredi <miklos@szeredi.hu>2007-05-24 08:05:45 +0000
committerGravatar Miklos Szeredi <miklos@szeredi.hu>2007-05-24 08:05:45 +0000
commit1bf09e6bf76573942343f10e8e403777e59b042a (patch)
treecce99a600ae6b492f5563e9acf6d69097dd6ffd0 /lib/fuse_loop_mt.c
parentbd63af1c8459d1fdd5e8aa5f596a86dec5539e93 (diff)
lib: fix memory leak on thread creation failure...
Diffstat (limited to 'lib/fuse_loop_mt.c')
-rw-r--r--lib/fuse_loop_mt.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/fuse_loop_mt.c b/lib/fuse_loop_mt.c
index c626ba6..e9e04b3 100644
--- a/lib/fuse_loop_mt.c
+++ b/lib/fuse_loop_mt.c
@@ -145,6 +145,8 @@ static int fuse_start_thread(struct fuse_mt *mt)
pthread_sigmask(SIG_SETMASK, &oldset, NULL);
if (res != 0) {
fprintf(stderr, "fuse: error creating thread: %s\n", strerror(res));
+ free(w->buf);
+ free(w);
return -1;
}
list_add_worker(w, &mt->main);