From: Miklos Szeredi Date: Thu, 24 May 2007 08:05:45 +0000 (+0000) Subject: lib: fix memory leak on thread creation failure... X-Git-Tag: fuse_2_7_0~10 X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=1bf09e6bf76573942343f10e8e403777e59b042a;p=qemu-gpiodev%2Flibfuse.git lib: fix memory leak on thread creation failure... --- diff --git a/ChangeLog b/ChangeLog index a65048d..4415a33 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2007-05-24 Miklos Szeredi + + * lib: fix memory leak on thread creation failure in multithreaded + event loop. Found by Chris AtLee + 2007-05-23 Miklos Szeredi * lowlevel lib: add fuse_reply_iov function, which is similar to 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);