From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:51632) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VOqDa-0000cd-Fe for qemu-devel@nongnu.org; Wed, 25 Sep 2013 10:37:37 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VOqDU-0007wL-E5 for qemu-devel@nongnu.org; Wed, 25 Sep 2013 10:37:30 -0400 Received: from mx1.redhat.com ([209.132.183.28]:55184) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VOqDU-0007wH-55 for qemu-devel@nongnu.org; Wed, 25 Sep 2013 10:37:24 -0400 Received: from int-mx11.intmail.prod.int.phx2.redhat.com (int-mx11.intmail.prod.int.phx2.redhat.com [10.5.11.24]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id r8PEbMRr014922 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Wed, 25 Sep 2013 10:37:22 -0400 From: Max Reitz Date: Wed, 25 Sep 2013 16:37:17 +0200 Message-Id: <1380119840-12672-1-git-send-email-mreitz@redhat.com> Subject: [Qemu-devel] [PATCH 0/3] qcow2: Small error path fixes for l2_allocate List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Kevin Wolf , Stefan Hajnoczi , Max Reitz Errors in l2_allocate should always go down the error path. If this path is taken, the newly allocated L2 cluster is abandoned and should thus be freed. The L2 table on the other hand should only be put back into the cache if it was taken from it before. Max Reitz (3): qcow2: Don't put invalid L2 table into cache qcow2: Free allocated L2 cluster on error qcow2: Always use error path in l2_allocate block/qcow2-cluster.c | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) -- 1.8.3.1