]> xenbits.xensource.com Git - qemu-upstream-4.6-testing.git/commitdiff
qemu-img: Plug memory leak in convert command
authorMarkus Armbruster <armbru@redhat.com>
Wed, 28 May 2014 09:17:07 +0000 (11:17 +0200)
committerMichael Roth <mdroth@linux.vnet.ibm.com>
Tue, 5 Aug 2014 16:41:00 +0000 (11:41 -0500)
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>
qemu-img.c

index 8455994c653c112d5da11a3fde2cb115ac5b4d1e..84aa1c9b8f7bffcf63931d242494172db146d934 100644 (file)
@@ -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);