mtd/util mkfs.jffs2.c,1.29,1.30

andersen at infradead.org andersen at infradead.org
Fri Dec 6 15:59:52 EST 2002


Update of /home/cvs/mtd/util
In directory phoenix.infradead.org:/tmp/cvs-serv14625

Modified Files:
	mkfs.jffs2.c 
Log Message:
Free some memory leaks


Index: mkfs.jffs2.c
===================================================================
RCS file: /home/cvs/mtd/util/mkfs.jffs2.c,v
retrieving revision 1.29
retrieving revision 1.30
diff -u -r1.29 -r1.30
--- mkfs.jffs2.c	26 Nov 2002 10:16:48 -0000	1.29
+++ mkfs.jffs2.c	6 Dec 2002 20:59:48 -0000	1.30
@@ -525,6 +525,8 @@
 		free(tmp);
 		if (parent == NULL) {
 			error_msg ("skipping device_table entry '%s': no parent directory!", name);
+			free(name);
+			free(hostpath);
 			return 1;
 		}
 
@@ -564,6 +566,7 @@
 				error_msg_and_die("Unsupported file type");
 		}
 	}
+	free(name);
 	free(hostpath);
 	return 0;
 }





More information about the linux-mtd-cvs mailing list