patch-2.4.7 linux/fs/jffs/jffs_fm.c

Next file: linux/fs/locks.c
Previous file: linux/fs/inode.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.4.6/linux/fs/jffs/jffs_fm.c linux/fs/jffs/jffs_fm.c
@@ -47,7 +47,10 @@
 	mtd = get_mtd_device(NULL, MINOR(dev));
 
 	if (!mtd)
+	{
+		kfree(fmc);
 		return NULL;
+	}
 	
 	/* Retrieve the size of the flash memory.  */
 	fmc->flash_start = 0;

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)