From: Alexey Dobriyan Date: Fri, 29 Sep 2006 09:01:06 +0000 (-0700) Subject: [PATCH] 9p: fix leak on error path X-Git-Tag: v2.6.19-rc1~704 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d826380b305971ff9825ef005ff039d655542bbb;p=linux-2.6 [PATCH] 9p: fix leak on error path If register_filesystem() fails mux workqueue must be killed. Signed-off-by: Alexey Dobriyan Cc: Eric Van Hensbergen Cc: Ron Minnich Cc: Latchesar Ionkov Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/fs/9p/v9fs.c b/fs/9p/v9fs.c index 22f7ccd58d..0f628041e3 100644 --- a/fs/9p/v9fs.c +++ b/fs/9p/v9fs.c @@ -460,8 +460,10 @@ static int __init init_v9fs(void) ret = v9fs_mux_global_init(); if (!ret) - ret = register_filesystem(&v9fs_fs_type); - + return ret; + ret = register_filesystem(&v9fs_fs_type); + if (!ret) + v9fs_mux_global_exit(); return ret; }