From patchwork Fri Apr 15 14:18:57 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Prasad Joshi X-Patchwork-Id: 710801 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter1.kernel.org (8.14.4/8.14.3) with ESMTP id p3FEIw1G014188 for ; Fri, 15 Apr 2011 14:18:58 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754928Ab1DOOSw (ORCPT ); Fri, 15 Apr 2011 10:18:52 -0400 Received: from mail-ww0-f44.google.com ([74.125.82.44]:62732 "EHLO mail-ww0-f44.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753948Ab1DOOSv (ORCPT ); Fri, 15 Apr 2011 10:18:51 -0400 Received: by wwa36 with SMTP id 36so3269190wwa.1 for ; Fri, 15 Apr 2011 07:18:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:from:to:cc:subject:date:message-id:x-mailer :in-reply-to:references; bh=ljrtU9tNjtfhyteJli68DnDeOf2QYqrZaCKXQFVM0kc=; b=Bvm0TMuvs462BmMmlrkmZ8C/hdMMH3ngVE8WCWf9vvg3+yRhe6ZS7NnrDI3NjdkTYh jwkq3942hJtUO7njVh0attcjHO8n/a8EPIXLftABAJhjfkccLl//8ZUo5h0lGQidfQvo KxHPtv3vX5F7vWt5iWEOGtMM0lO/q/ghG1LgQ= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references; b=d1QFRyFNws7+6S1PzkMUCBUfwqvcudUb8Pd1KqNFiTXvO4298hGNkPdCIg4tt3rXMT Z1Oq/JysmRUK2ASQqKdTZbej9LvsYCjx9fZv9RPCwKdR1KvejorHFK9UJVH5uiy54UKP D76TNqS83KYhU07jflXiR0XZlCmfMH1yyXBq0= Received: by 10.227.168.204 with SMTP id v12mr2124436wby.142.1302877130018; Fri, 15 Apr 2011 07:18:50 -0700 (PDT) Received: from prasad-kvm.localdomain (pineapple.rdg.ac.uk [134.225.206.123]) by mx.google.com with ESMTPS id w25sm1649383wbd.39.2011.04.15.07.18.48 (version=TLSv1/SSLv3 cipher=OTHER); Fri, 15 Apr 2011 07:18:48 -0700 (PDT) Received: by prasad-kvm.localdomain (Postfix, from userid 1000) id ECC2C26E006F; Fri, 15 Apr 2011 15:18:59 +0100 (BST) From: Prasad Joshi To: prasadjoshi124@gmail.com Cc: mingo@elte.hu, kvm@vger.kernel.org, penberg@kernel.org, asias.hejun@gmail.com, gorcunov@gmail.com, levinsasha928@gmail.com, kwolf@redhat.com, stefanha@linux.vnet.ibm.com, chaitanyakulkarni15@gmail.com Subject: [PATCH 3/4] kvm tool: deallocate the cached l1_table in qcow1_disk_close() and in error path of qcow1_probe() Date: Fri, 15 Apr 2011 15:18:57 +0100 Message-Id: <1302877138-6695-3-git-send-email-prasadjoshi124@gmail.com> X-Mailer: git-send-email 1.7.1 In-Reply-To: <1302877138-6695-1-git-send-email-prasadjoshi124@gmail.com> References: <1302877138-6695-1-git-send-email-prasadjoshi124@gmail.com> Sender: kvm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.6 (demeter1.kernel.org [140.211.167.41]); Fri, 15 Apr 2011 14:18:58 +0000 (UTC) Signed-off-by: Prasad Joshi --- tools/kvm/qcow.c | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/tools/kvm/qcow.c b/tools/kvm/qcow.c index 243bfa8..9b9af86 100644 --- a/tools/kvm/qcow.c +++ b/tools/kvm/qcow.c @@ -115,6 +115,7 @@ static void qcow1_disk_close(struct disk_image *self) q = self->priv; + free(q->table.l1_table); free(q->header); free(q); } @@ -200,6 +201,7 @@ error: if (!q) return NULL; + free(q->table.l1_table); free(q->header); free(q);