From patchwork Thu Apr 29 16:24:50 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jan Kiszka X-Patchwork-Id: 51301 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [199.232.76.165]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 2144DB7080 for ; Fri, 30 Apr 2010 02:30:50 +1000 (EST) Received: from localhost ([127.0.0.1]:60897 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1O7WdT-0004oB-N3 for incoming@patchwork.ozlabs.org; Thu, 29 Apr 2010 12:30:47 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1O7WXn-0002Gm-F7 for qemu-devel@nongnu.org; Thu, 29 Apr 2010 12:24:55 -0400 Received: from [140.186.70.92] (port=60114 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1O7WXl-0002F6-Qk for qemu-devel@nongnu.org; Thu, 29 Apr 2010 12:24:54 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1O7WXk-0003dU-Jh for qemu-devel@nongnu.org; Thu, 29 Apr 2010 12:24:53 -0400 Received: from david.siemens.de ([192.35.17.14]:16678) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1O7WXk-0003dK-8q for qemu-devel@nongnu.org; Thu, 29 Apr 2010 12:24:52 -0400 Received: from mail2.siemens.de (localhost [127.0.0.1]) by david.siemens.de (8.12.11.20060308/8.12.11) with ESMTP id o3TGOpfh007292; Thu, 29 Apr 2010 18:24:51 +0200 Received: from [139.25.109.167] (mchn012c.ww002.siemens.net [139.25.109.167] (may be forged)) by mail2.siemens.de (8.12.11.20060308/8.12.11) with ESMTP id o3TGOoHw027082; Thu, 29 Apr 2010 18:24:51 +0200 Message-ID: <4BD9B2D2.9040208@siemens.com> Date: Thu, 29 Apr 2010 18:24:50 +0200 From: Jan Kiszka User-Agent: Mozilla/5.0 (X11; U; Linux i686 (x86_64); de; rv:1.8.1.12) Gecko/20080226 SUSE/2.0.0.12-1.1 Thunderbird/2.0.0.12 Mnenhy/0.7.5.666 MIME-Version: 1.0 To: Kevin Wolf X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.4-2.6 Cc: qemu-devel , Gerd Hoffmann Subject: [Qemu-devel] [PATCH] block: Release allocated options after bdrv_open X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org They aren't used afterwards nor supposed to be stored by a bdrv_create handler. Signed-off-by: Jan Kiszka --- block.c | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/block.c b/block.c index 7974215..f228d8d 100644 --- a/block.c +++ b/block.c @@ -411,6 +411,7 @@ int bdrv_open(BlockDriverState *bs, const char *filename, int flags, } ret = bdrv_create(bdrv_qcow2, tmp_filename, options); + free_option_parameters(options); if (ret < 0) { return ret; }