From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:38333) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VTpUD-0007Sg-Uh for qemu-devel@nongnu.org; Wed, 09 Oct 2013 04:51:24 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VTpU6-0001rl-BZ for qemu-devel@nongnu.org; Wed, 09 Oct 2013 04:51:17 -0400 Received: from mx1.redhat.com ([209.132.183.28]:57536) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VTpU6-0001rh-35 for qemu-devel@nongnu.org; Wed, 09 Oct 2013 04:51:10 -0400 Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id r998p9HH016222 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Wed, 9 Oct 2013 04:51:09 -0400 From: Max Reitz Date: Wed, 9 Oct 2013 10:51:03 +0200 Message-Id: <1381308666-24268-1-git-send-email-mreitz@redhat.com> Subject: [Qemu-devel] [PATCH 0/3] qcow2: Small error path fixes for snapshot writing 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 qcow2_write_snapshots should always go down the error path. If this path is taken, the newly allocated snapshot table clusters are abandoned and should thus be freed. Furthermore, we should safeguard against a possible future increase of QEMU's maximum snapshot name/ID length. Max Reitz (3): qcow2: Always use error path on writing snapshots qcow2: Free allocated snapshot table on error qcow2: Assert against snapshot name/ID overflow block/qcow2-snapshot.c | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) -- 1.8.3.1