Skip to content

Commit

Permalink
[PATCH] fat: fix slab cache leak
Browse files Browse the repository at this point in the history
This patch plugs a slab cache leak in fat module initialization.

Signed-off-by: Pekka Enberg <[email protected]>
Acked-by: OGAWA Hirofumi <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
  • Loading branch information
Pekka J Enberg authored and Linus Torvalds committed Jun 30, 2005
1 parent 9ec55a9 commit 532a39a
Showing 1 changed file with 14 additions and 5 deletions.
19 changes: 14 additions & 5 deletions fs/fat/inode.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 532a39a

Please sign in to comment.