From patchwork Mon Jun 2 13:56:32 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kevin Wolf X-Patchwork-Id: 354903 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 79ABF140086 for ; Mon, 2 Jun 2014 23:57:39 +1000 (EST) Received: from localhost ([::1]:45316 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WrSk5-00037c-Fa for incoming@patchwork.ozlabs.org; Mon, 02 Jun 2014 09:57:37 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:41057) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WrSjR-00026Q-Tu for qemu-devel@nongnu.org; Mon, 02 Jun 2014 09:57:02 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WrSjM-0003Lr-TA for qemu-devel@nongnu.org; Mon, 02 Jun 2014 09:56:57 -0400 Received: from mx1.redhat.com ([209.132.183.28]:1300) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WrSjM-0003Lh-Ks for qemu-devel@nongnu.org; Mon, 02 Jun 2014 09:56:52 -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 s52DuqvD022452 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Mon, 2 Jun 2014 09:56:52 -0400 Received: from noname.str.redhat.com (dhcp-192-197.str.redhat.com [10.33.192.197]) by int-mx10.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id s52DunJK000974; Mon, 2 Jun 2014 09:56:51 -0400 From: Kevin Wolf To: qemu-devel@nongnu.org Date: Mon, 2 Jun 2014 15:56:32 +0200 Message-Id: <1401717408-4607-2-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> X-Scanned-By: MIMEDefang 2.68 on 10.5.11.23 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 209.132.183.28 Cc: kwolf@redhat.com Subject: [Qemu-devel] [PULL 01/17] qemu-img: Plug memory leak on block option help error path X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org From: Markus Armbruster Introduced in commit a283cb6; mostly harmless. Spotted by Coverity. Signed-off-by: Markus Armbruster Reviewed-by: Benoit Canet Signed-off-by: Kevin Wolf --- qemu-img.c | 1 + 1 file changed, 1 insertion(+) diff --git a/qemu-img.c b/qemu-img.c index 1ad899e..62ea27e 100644 --- a/qemu-img.c +++ b/qemu-img.c @@ -287,6 +287,7 @@ static int print_block_option_help(const char *filename, const char *fmt) proto_drv = bdrv_find_protocol(filename, true); if (!proto_drv) { error_report("Unknown protocol '%s'", filename); + free_option_parameters(create_options); return 1; } create_options = append_option_parameters(create_options,