From patchwork Thu Jul 28 07:40:41 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Frediano Ziglio X-Patchwork-Id: 107196 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [140.186.70.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id B933FB6F57 for ; Thu, 28 Jul 2011 17:41:41 +1000 (EST) Received: from localhost ([::1]:51569 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QmLDs-0005st-H8 for incoming@patchwork.ozlabs.org; Thu, 28 Jul 2011 03:41:36 -0400 Received: from eggs.gnu.org ([140.186.70.92]:44558) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QmLDL-0004cP-Op for qemu-devel@nongnu.org; Thu, 28 Jul 2011 03:41:04 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QmLDK-0004dL-BP for qemu-devel@nongnu.org; Thu, 28 Jul 2011 03:41:03 -0400 Received: from mail-fx0-f45.google.com ([209.85.161.45]:32869) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QmLDK-0004Z7-6F for qemu-devel@nongnu.org; Thu, 28 Jul 2011 03:41:02 -0400 Received: by mail-fx0-f45.google.com with SMTP id b27so719180fxb.4 for ; Thu, 28 Jul 2011 00:41:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references; bh=iL1aGNbBQp55rSr0bfFXgy7vfVTjs04UzI2jpxo0A5Y=; b=h8FA18G+IAmgh37TY4XNEhNdTkI449YYu08+jis9EvQiYPlFObN3ZZHEAoeC98nGAZ 4Du2XDsmi9MUcY2hS8JmN3QECDVUNCHvlHxyOaQq2n9Eq98htqytksyt2qcdpjICfiuZ NOLSjFE/3Rc9F/kv/xF1cTuPOsoZX/x7KMERw= Received: by 10.223.145.144 with SMTP id d16mr948457fav.100.1311838861720; Thu, 28 Jul 2011 00:41:01 -0700 (PDT) Received: from obol602.omnitel.it ([87.236.194.191]) by mx.google.com with ESMTPS id y15sm287187fah.35.2011.07.28.00.40.59 (version=SSLv3 cipher=OTHER); Thu, 28 Jul 2011 00:41:01 -0700 (PDT) From: Frediano Ziglio To: Kevin Wolf Date: Thu, 28 Jul 2011 09:40:41 +0200 Message-Id: <1311838841-4853-9-git-send-email-freddy77@gmail.com> X-Mailer: git-send-email 1.7.1 In-Reply-To: <1311838841-4853-1-git-send-email-freddy77@gmail.com> References: <1311838841-4853-1-git-send-email-freddy77@gmail.com> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-Received-From: 209.85.161.45 Cc: qemu-devel@nongnu.org, Frediano Ziglio Subject: [Qemu-devel] [PATCH 8/8] qcow2: remove memory leak 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 Signed-off-by: Frediano Ziglio --- block/qcow2.c | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/block/qcow2.c b/block/qcow2.c index 6073568..aed8da7 100644 --- a/block/qcow2.c +++ b/block/qcow2.c @@ -492,6 +492,7 @@ fail: qemu_co_mutex_unlock(&s->lock); qemu_iovec_destroy(&hd_qiov); + qemu_free(cluster_data); return ret; } @@ -604,6 +605,7 @@ fail: qemu_co_mutex_unlock(&s->lock); qemu_iovec_destroy(&hd_qiov); + qemu_free(cluster_data); return ret; }