From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:38261) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XF83C-0000At-9V for qemu-devel@nongnu.org; Wed, 06 Aug 2014 16:43:35 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XF82u-0005Jd-8R for qemu-devel@nongnu.org; Wed, 06 Aug 2014 16:43:10 -0400 Received: from e36.co.us.ibm.com ([32.97.110.154]:45590) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XF82u-0005J5-2I for qemu-devel@nongnu.org; Wed, 06 Aug 2014 16:42:52 -0400 Received: from /spool/local by e36.co.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Wed, 6 Aug 2014 14:42:51 -0600 From: Michael Roth Date: Wed, 6 Aug 2014 15:39:04 -0500 Message-Id: <1407357598-21541-55-git-send-email-mdroth@linux.vnet.ibm.com> In-Reply-To: <1407357598-21541-1-git-send-email-mdroth@linux.vnet.ibm.com> References: <1407357598-21541-1-git-send-email-mdroth@linux.vnet.ibm.com> Subject: [Qemu-devel] [PATCH 054/108] 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 8455994..84aa1c9 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); -- 1.9.1