From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:48165) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VisBz-0005mU-HX for qemu-devel@nongnu.org; Tue, 19 Nov 2013 15:46:44 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VisBu-0007dU-L4 for qemu-devel@nongnu.org; Tue, 19 Nov 2013 15:46:39 -0500 Received: from mx1.redhat.com ([209.132.183.28]:36756) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VisBu-0007dP-CL for qemu-devel@nongnu.org; Tue, 19 Nov 2013 15:46:34 -0500 Received: from int-mx01.intmail.prod.int.phx2.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id rAJKkX0L015964 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Tue, 19 Nov 2013 15:46:33 -0500 Message-ID: <528BCE28.7070206@redhat.com> Date: Tue, 19 Nov 2013 13:46:32 -0700 From: Eric Blake MIME-Version: 1.0 References: <1384697924-16918-1-git-send-email-mreitz@redhat.com> <1384697924-16918-2-git-send-email-mreitz@redhat.com> In-Reply-To: <1384697924-16918-2-git-send-email-mreitz@redhat.com> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="nbqOUxWfkBKWU1KxW637h6lnWcE0HC14f" Subject: Re: [Qemu-devel] [PATCH 1/4] qcow2: Move reading nb_snapshots in qcow2_open List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Max Reitz , qemu-devel@nongnu.org Cc: Kevin Wolf , Stefan Hajnoczi This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --nbqOUxWfkBKWU1KxW637h6lnWcE0HC14f Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On 11/17/2013 07:18 AM, Max Reitz wrote: > Any goto fail between having read nb_snapshots (returning a non-zero > value) and allocating s->snapshots (through qcow2_read_snapshots()) > results in qcow2_free_snapshots() being called, dereferencing > s->snapshots which is still NULL. >=20 > Fix this by moving the reading of nb_snapshots right before the call to= > qcow2_read_snapshots(). >=20 > Signed-off-by: Max Reitz > --- > block/qcow2.c | 6 +++--- > 1 file changed, 3 insertions(+), 3 deletions(-) Are you intending this series as a bug fix for 1.7? Reviewed-by: Eric Blake --=20 Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --nbqOUxWfkBKWU1KxW637h6lnWcE0HC14f Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.15 (GNU/Linux) Comment: Public key at http://people.redhat.com/eblake/eblake.gpg Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQEcBAEBCAAGBQJSi84oAAoJEKeha0olJ0NqE+kH/iKQYmwh7D7mKtvexqoqZwLw TO0fV1igFLFBgtD7cgjEd0cCxO5EzIDqLAqz6ygYAT0ZeYgbjq09Y6+MWw3PyeL4 cAiz7uEl4NduSajEPXGtDzbdql2X/Vp+/t4jpW5IpO/d7/IPoqOHrF88IRsMhbQ+ v/af3FCy7SPmSm4OZAYB1cdA4Iu8LA+wOxd8C4L+s1dU5lSnCUrQxpPxGXOuZ/lb UUQWzBFiN8wp1xGR+adktdp6K5EAen27esIPUOa3ita7sxHhmsKjERFH2laIbUFo o0FFZ58NpfIP/B8e7DBZekgkOgOqKIfjBse1DV40e0jv7VGYHTJLcbJJpPvg/nk= =Y9Q7 -----END PGP SIGNATURE----- --nbqOUxWfkBKWU1KxW637h6lnWcE0HC14f--