* [PATCH] fat: fix slab cache leak
@ 2005-06-29 6:06 Pekka J Enberg
2005-06-29 17:14 ` OGAWA Hirofumi
0 siblings, 1 reply; 2+ messages in thread
From: Pekka J Enberg @ 2005-06-29 6:06 UTC (permalink / raw)
To: akpm; +Cc: hirofumi, linux-kernel
This patch plugs a slab cache leak in fat module initialization.
Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi>
---
inode.c | 19 ++++++++++++++-----
1 files changed, 14 insertions(+), 5 deletions(-)
Index: 2.6/fs/fat/inode.c
===================================================================
--- 2.6.orig/fs/fat/inode.c 2005-06-17 22:48:29.000000000 +0300
+++ 2.6/fs/fat/inode.c 2005-06-29 08:16:12.000000000 +0300
@@ -1331,12 +1331,21 @@
static int __init init_fat_fs(void)
{
- int ret;
+ int err;
+
+ err = fat_cache_init();
+ if (err)
+ return err;
- ret = fat_cache_init();
- if (ret < 0)
- return ret;
- return fat_init_inodecache();
+ err = fat_init_inodecache();
+ if (err)
+ goto failed;
+
+ return 0;
+
+failed:
+ fat_cache_destroy();
+ return err;
}
static void __exit exit_fat_fs(void)
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2005-06-29 17:24 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-06-29 6:06 [PATCH] fat: fix slab cache leak Pekka J Enberg
2005-06-29 17:14 ` OGAWA Hirofumi
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®