Messages in this thread Patch in this message | | | Date | Wed, 29 Jun 2005 09:06:53 +0300 (EEST) | From | Pekka J Enberg <> | 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/
| |