提交 532a39a3 编写于 作者: P Pekka J Enberg 提交者: Linus Torvalds

[PATCH] fat: fix slab cache leak

This patch plugs a slab cache leak in fat module initialization.
Signed-off-by: NPekka Enberg <penberg@cs.helsinki.fi>
Acked-by: NOGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
Signed-off-by: NAndrew Morton <akpm@osdl.org>
Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
上级 9ec55a9b
......@@ -1331,12 +1331,21 @@ void __exit fat_cache_destroy(void);
static int __init init_fat_fs(void)
{
int ret;
int err;
ret = fat_cache_init();
if (ret < 0)
return ret;
return fat_init_inodecache();
err = fat_cache_init();
if (err)
return err;
err = fat_init_inodecache();
if (err)
goto failed;
return 0;
failed:
fat_cache_destroy();
return err;
}
static void __exit exit_fat_fs(void)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册