Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

[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>
Acked-by: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>

authored by

Pekka J Enberg and committed by
Linus Torvalds
532a39a3 9ec55a9b

+14 -5
+14 -5
fs/fat/inode.c
··· 1331 1331 1332 1332 static int __init init_fat_fs(void) 1333 1333 { 1334 - int ret; 1334 + int err; 1335 1335 1336 - ret = fat_cache_init(); 1337 - if (ret < 0) 1338 - return ret; 1339 - return fat_init_inodecache(); 1336 + err = fat_cache_init(); 1337 + if (err) 1338 + return err; 1339 + 1340 + err = fat_init_inodecache(); 1341 + if (err) 1342 + goto failed; 1343 + 1344 + return 0; 1345 + 1346 + failed: 1347 + fat_cache_destroy(); 1348 + return err; 1340 1349 } 1341 1350 1342 1351 static void __exit exit_fat_fs(void)