summaryrefslogtreecommitdiff
path: root/ubi-utils/ubiformat.c
diff options
context:
space:
mode:
authorDavid Oberhollenzer <david.oberhollenzer@sigma-star.at>2019-11-10 14:52:05 +0100
committerDavid Oberhollenzer <david.oberhollenzer@sigma-star.at>2019-11-10 15:30:04 +0100
commitaf06f37bdee2097d23832da99a3e7725de2f695e (patch)
tree12981be2228451f4a556064d40d8eebfe25968cb /ubi-utils/ubiformat.c
parentd74d413c0bdc324b677b4b9ec47f89fd3e648faa (diff)
ubiformat: don't leak file descriptors
The original code had a 'goto out_close' directly after a return error code, which is obviously not what was intended. Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
Diffstat (limited to 'ubi-utils/ubiformat.c')
-rw-r--r--ubi-utils/ubiformat.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/ubi-utils/ubiformat.c b/ubi-utils/ubiformat.c
index a90627c..64afad2 100644
--- a/ubi-utils/ubiformat.c
+++ b/ubi-utils/ubiformat.c
@@ -426,8 +426,8 @@ static int flash_image(libmtd_t libmtd, const struct mtd_dev_info *mtd,
}
if (st_size % mtd->eb_size) {
- return sys_errmsg("file \"%s\" (size %lld bytes) is not multiple of ""eraseblock size (%d bytes)",
- args.image, (long long)st_size, mtd->eb_size);
+ sys_errmsg("file \"%s\" (size %lld bytes) is not multiple of ""eraseblock size (%d bytes)",
+ args.image, (long long)st_size, mtd->eb_size);
goto out_close;
}