From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NXXPM-0000fL-D7 for qemu-devel@nongnu.org; Wed, 20 Jan 2010 05:03:28 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1NXXPH-0000cE-Au for qemu-devel@nongnu.org; Wed, 20 Jan 2010 05:03:27 -0500 Received: from [199.232.76.173] (port=56763 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NXXPH-0000cA-6q for qemu-devel@nongnu.org; Wed, 20 Jan 2010 05:03:23 -0500 Received: from mx1.redhat.com ([209.132.183.28]:24157) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1NXXPG-0002fX-HN for qemu-devel@nongnu.org; Wed, 20 Jan 2010 05:03:22 -0500 Message-ID: <4B56D4A9.1000004@redhat.com> Date: Wed, 20 Jan 2010 11:02:17 +0100 From: Kevin Wolf MIME-Version: 1.0 Subject: Re: [Qemu-devel] [PATCH 10/10] qcow2: Don't ignore qcow2_alloc_clusters return value References: <1263816696-24122-1-git-send-email-kwolf@redhat.com> <1263816696-24122-11-git-send-email-kwolf@redhat.com> <20100119185831.GD31526@lst.de> In-Reply-To: <20100119185831.GD31526@lst.de> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Christoph Hellwig Cc: qemu-devel@nongnu.org Am 19.01.2010 19:58, schrieb Christoph Hellwig: > On Mon, Jan 18, 2010 at 01:11:36PM +0100, Kevin Wolf wrote: >> @@ -55,6 +55,9 @@ int qcow2_grow_l1_table(BlockDriverState *bs, int min_size) >> >> /* write new table (align to cluster) */ >> new_l1_table_offset = qcow2_alloc_clusters(bs, new_l1_size2); >> + if (new_l1_table_offset < 0) { >> + return new_l1_table_offset; >> + } > > I think the error return needs to free new_l1_table first. Right. Actually, I have found this bug already and included the fix in patch 11/10 which contains the fix to the problem you found with patch 1 (however, I wasn't aware any more that I introduced it myself). Maybe I should better respin the series instead of posting patch 11 on top. Kevin