From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:41950) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1X4Z7J-0005Eo-7Z for qemu-devel@nongnu.org; Tue, 08 Jul 2014 13:24:42 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1X4Z6O-00013P-Es for qemu-devel@nongnu.org; Tue, 08 Jul 2014 13:23:45 -0400 Received: from e33.co.us.ibm.com ([32.97.110.151]:60553) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1X4Z6N-00012i-Uf for qemu-devel@nongnu.org; Tue, 08 Jul 2014 13:22:48 -0400 Received: from /spool/local by e33.co.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Tue, 8 Jul 2014 11:22:47 -0600 From: Michael Roth Date: Tue, 8 Jul 2014 12:18:41 -0500 Message-Id: <1404839947-1086-131-git-send-email-mdroth@linux.vnet.ibm.com> In-Reply-To: <1404839947-1086-1-git-send-email-mdroth@linux.vnet.ibm.com> References: <1404839947-1086-1-git-send-email-mdroth@linux.vnet.ibm.com> Subject: [Qemu-devel] [PATCH 130/156] qemu-img: Plug memory leak in convert command List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: qemu-stable@nongnu.org From: Markus Armbruster 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 --- qemu-img.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/qemu-img.c b/qemu-img.c index b6b5644..1d5caa3 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); -- 1.9.1