lkml.org 
[lkml]   [2005]   [Jun]   [29]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[PATCH] fat: fix slab cache leak
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)
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
\
 
 \ /
  Last update: 2005-06-29 08:11    [W:0.030 / U:0.416 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site