mtd/fs/jffs2 compr.c,1.32,1.33

David Woodhouse dwmw2 at infradead.org
Fri Nov 28 12:22:56 EST 2003


Update of /home/cvs/mtd/fs/jffs2
In directory phoenix.infradead.org:/tmp/cvs-serv12680

Modified Files:
	compr.c 
Log Message:
Fix error on kfree failure


Index: compr.c
===================================================================
RCS file: /home/cvs/mtd/fs/jffs2/compr.c,v
retrieving revision 1.32
retrieving revision 1.33
diff -u -r1.32 -r1.33
--- compr.c	28 Nov 2003 14:33:09 -0000	1.32
+++ compr.c	28 Nov 2003 17:22:54 -0000	1.33
@@ -55,7 +55,7 @@
 	*cpage_out = kmalloc(*cdatalen, GFP_KERNEL);
 	if (!*cpage_out) {
 		printk(KERN_WARNING "No memory for compressor allocation. Compression failed\n");
-		return JFFS2_COMPR_NONE;
+		goto out;
 	}
 
 #ifdef JFFS2_USE_ZLIB
@@ -85,6 +85,7 @@
 #endif
 	kfree(*cpage_out);
 #endif /* Compression */
+ out:
 	*cpage_out = data_in;
 	*datalen = *cdatalen;
 	return JFFS2_COMPR_NONE; /* We failed to compress */




More information about the linux-mtd-cvs mailing list