From: Markus Armbruster Date: Wed, 28 May 2014 09:17:07 +0000 (+0200) Subject: qemu-img: Plug memory leak in convert command X-Git-Tag: qemu-xen-4.5.0-rc1^2~65 X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=12d5fc6ab464eb3fee121226b55099be3035d1e2;p=qemu-upstream-4.5-testing.git qemu-img: Plug memory leak in convert command Introduced in commit 661a0f7. Spotted by Coverity. Signed-off-by: Markus Armbruster Reviewed-by: Benoit Canet Signed-off-by: Kevin Wolf (cherry picked from commit bb9cd2ee99f6537c072d5f4bac441717d3cd2bed) Signed-off-by: Michael Roth --- diff --git a/qemu-img.c b/qemu-img.c index 8455994c6..84aa1c9b8 100644 --- a/qemu-img.c +++ b/qemu-img.c @@ -1413,7 +1413,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);