summaryrefslogtreecommitdiff
path: root/mkfs.jffs2.c
diff options
context:
space:
mode:
authorDavid Woodhouse <dwmw2@infradead.org>2006-04-11 20:29:58 -0500
committerJosh Boyer <jwboyer@gmail.com>2006-04-11 20:29:58 -0500
commit3db28b81fc01c94979e1ba2684bd82190cce71b1 (patch)
treeae021533d1a8a095be7b776c6c2a770847c41369 /mkfs.jffs2.c
parent092338c8d5e0f05af4a2356d8ce601bd6cdf4c53 (diff)
Fix memory leak in write_regular_file()
Signed-off-by: Josh Boyer <jwboyer@gmail.com>
Diffstat (limited to 'mkfs.jffs2.c')
-rw-r--r--mkfs.jffs2.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/mkfs.jffs2.c b/mkfs.jffs2.c
index feac88d..8d1c7a5 100644
--- a/mkfs.jffs2.c
+++ b/mkfs.jffs2.c
@@ -866,7 +866,8 @@ static void write_regular_file(struct filesystem_entry *e)
len -= dsize;
offset += dsize;
- if (tbuf!=cbuf) if (!cbuf) free(cbuf);
+ if (tbuf!= cbuf)
+ free(cbuf);
}
}
if (!je32_to_cpu(ri.version)) {
@@ -1202,7 +1203,7 @@ static char *helptext =
" -V, --version Display version information\n"
" -i, --incremental=FILE Parse FILE and generate appendage output for it\n\n";
-static char *revtext = "$Revision: 1.45 $";
+static char *revtext = "$Revision: 1.49 $";
int load_next_block() {