mtd/fs/jffs2 scan.c,1.103,1.104
David Woodhouse
dwmw2 at infradead.org
Sat Oct 11 10:52:51 EDT 2003
- Previous message: mtd/fs/jffs2 dir.c,1.81,1.82 file.c,1.95,1.96 fs.c,1.31,1.32
os-linux.h,1.36,1.37 super.c,1.89,1.90
- Next message: mtd/include/linux suspend.h,NONE,1.1
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Update of /home/cvs/mtd/fs/jffs2
In directory phoenix.infradead.org:/tmp/cvs-serv23735
Modified Files:
scan.c
Log Message:
Fix memory leak
Index: scan.c
===================================================================
RCS file: /home/cvs/mtd/fs/jffs2/scan.c,v
retrieving revision 1.103
retrieving revision 1.104
diff -u -r1.103 -r1.104
--- scan.c 7 Oct 2003 14:46:23 -0000 1.103
+++ scan.c 11 Oct 2003 14:52:48 -0000 1.104
@@ -116,7 +116,7 @@
ret = jffs2_scan_eraseblock(c, jeb, buf_size?flashbuf:(flashbuf+jeb->offset), buf_size);
if (ret < 0)
- return ret;
+ goto out;
ACCT_PARANOIA_CHECK(jeb);
@@ -240,17 +240,20 @@
if ( !c->used_size && ((empty_blocks+bad_blocks)!= c->nr_blocks || bad_blocks == c->nr_blocks) ) {
printk(KERN_NOTICE "Cowardly refusing to erase blocks on filesystem with no valid JFFS2 nodes\n");
printk(KERN_NOTICE "empty_blocks %d, bad_blocks %d, c->nr_blocks %d\n",empty_blocks,bad_blocks,c->nr_blocks);
- return -EIO;
+ ret = -EIO;
+ goto out;
}
jffs2_erase_pending_trigger(c);
}
+ ret = 0;
+ out:
if (buf_size)
kfree(flashbuf);
#ifndef __ECOS
else
c->mtd->unpoint(c->mtd, flashbuf, 0, c->mtd->size);
#endif
- return 0;
+ return ret;
}
static int jffs2_fill_scan_buf (struct jffs2_sb_info *c, unsigned char *buf,
- Previous message: mtd/fs/jffs2 dir.c,1.81,1.82 file.c,1.95,1.96 fs.c,1.31,1.32
os-linux.h,1.36,1.37 super.c,1.89,1.90
- Next message: mtd/include/linux suspend.h,NONE,1.1
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the linux-mtd-cvs
mailing list