Received: from eggs.gnu.org ([2001:4830:134:3::10]:41276) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WrSjg-0002N4-Lq for qemu-devel@nongnu.org; Mon, 02 Jun 2014 09:57:17 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WrSja-0003Ty-Bw for qemu-devel@nongnu.org; Mon, 02 Jun 2014 09:57:12 -0400 Received: from mx1.redhat.com ([209.132.183.28]:49095) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WrSja-0003TY-4H for qemu-devel@nongnu.org; Mon, 02 Jun 2014 09:57:06 -0400 Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id s52Dv46f016724 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Mon, 2 Jun 2014 09:57:05 -0400 From: Kevin Wolf Date: Mon, 2 Jun 2014 15:56:45 +0200 Message-Id: <1401717408-4607-15-git-send-email-kwolf@redhat.com> In-Reply-To: <1401717408-4607-1-git-send-email-kwolf@redhat.com> References: <1401717408-4607-1-git-send-email-kwolf@redhat.com> Subject: [Qemu-devel] [PULL 14/17] 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: kwolf@redhat.com From: Markus Armbruster Introduced in commit 661a0f7. Spotted by Coverity. Signed-off-by: Markus Armbruster Reviewed-by: Benoit Canet Signed-off-by: Kevin Wolf --- qemu-img.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/qemu-img.c b/qemu-img.c index 62ea27e..d118da5 100644 --- a/qemu-img.c +++ b/qemu-img.c @@ -1455,7 +1455,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("target", out_filename, out_fmt, flags, true, quiet); -- 1.8.3.1