summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarkus Armbruster <armbru@redhat.com>2014-05-28 11:17:07 +0200
committerMichael Roth <mdroth@linux.vnet.ibm.com>2014-07-03 16:31:29 -0500
commitcb34d1e9e938f42aacbd85c8d0ac08b66d44ad29 (patch)
treec0317b0221bed33b0eb16df9fc7ef6f6ee964aa6
parentdf9c108acd5aaf4f5ac6e5b799b619c6b6a88975 (diff)
downloadqemu-cb34d1e9e938f42aacbd85c8d0ac08b66d44ad29.tar.gz
qemu-img: Plug memory leak in convert command
Introduced in commit 661a0f7. Spotted by Coverity. Signed-off-by: Markus Armbruster <armbru@redhat.com> Reviewed-by: Benoit Canet <benoit@irqsave.net> Signed-off-by: Kevin Wolf <kwolf@redhat.com> (cherry picked from commit bb9cd2ee99f6537c072d5f4bac441717d3cd2bed) Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
-rw-r--r--qemu-img.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/qemu-img.c b/qemu-img.c
index b6b5644cb6..1d5caa3c8b 100644
--- a/qemu-img.c
+++ b/qemu-img.c
@@ -1355,7 +1355,7 @@ static int img_convert(int argc, char **argv)
ret = bdrv_parse_cache_flags(cache, &flags);
if (ret < 0) {
error_report("Invalid cache option: %s", cache);
- return -1;
+ goto out;
}
out_bs = bdrv_new_open(out_filename, out_fmt, flags, true, quiet);