From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:41156) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bKPp0-0003Eh-Fl for qemu-devel@nongnu.org; Tue, 05 Jul 2016 08:51:27 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bKPov-00052j-Gq for qemu-devel@nongnu.org; Tue, 05 Jul 2016 08:51:25 -0400 Received: from mx1.redhat.com ([209.132.183.28]:56562) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bKPov-00052S-Aa for qemu-devel@nongnu.org; Tue, 05 Jul 2016 08:51:21 -0400 References: <1467636059-12557-1-git-send-email-pbonzini@redhat.com> From: Eric Blake Message-ID: <577BAD47.3030805@redhat.com> Date: Tue, 5 Jul 2016 06:51:19 -0600 MIME-Version: 1.0 In-Reply-To: <1467636059-12557-1-git-send-email-pbonzini@redhat.com> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="48b1O0sxe3SB8CghHBoAuuxXPtOH7KIu3" Subject: Re: [Qemu-devel] [PATCH] json-streamer: fix double-free on exiting during a parse List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Paolo Bonzini , qemu-devel@nongnu.org Cc: armbru@redhat.com, xiecl.fnst@cn.fujitsu.com This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --48b1O0sxe3SB8CghHBoAuuxXPtOH7KIu3 From: Eric Blake To: Paolo Bonzini , qemu-devel@nongnu.org Cc: armbru@redhat.com, xiecl.fnst@cn.fujitsu.com Message-ID: <577BAD47.3030805@redhat.com> Subject: Re: [PATCH] json-streamer: fix double-free on exiting during a parse References: <1467636059-12557-1-git-send-email-pbonzini@redhat.com> In-Reply-To: <1467636059-12557-1-git-send-email-pbonzini@redhat.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 07/04/2016 06:40 AM, Paolo Bonzini wrote: > Now that json-streamer tries not to leak tokens on incomplete parse, > the tokens can be freed twice if QEMU destroys the json-streamer > object during the parser->emit call. To fix this, create the new > empty GQueue earlier, so that it is already in place when the old > one is passed to parser->emit. >=20 > Reported-by: Changlong Xie > Signed-off-by: Paolo Bonzini > --- > qobject/json-streamer.c | 8 ++++++-- > 1 file changed, 6 insertions(+), 2 deletions(-) Reviewed-by: Eric Blake --=20 Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --48b1O0sxe3SB8CghHBoAuuxXPtOH7KIu3 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 Comment: Public key at http://people.redhat.com/eblake/eblake.gpg Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQEcBAEBCAAGBQJXe61HAAoJEKeha0olJ0Nqc04IAIlgdlmKWFaN7u1lManRqqp3 1WG8/UkuOLb4wDceo4BqEuh3dFrydPoeISdolcoJhlKEotBuLi2DeMSP0STLfWur VrL+FxsLhDWY8Xn4usHyKpIaodIs/cMDTMU2Ve5pu1LKJqoZVPKpB6kUOzaC0Shm PWfOh2HdbYqsD7teNwzbSmumDy+zDy9xGU3B6FYuWSCmlpyVWiGGPfdybcJc6Puq jSxFygh2KlxZrjGBhXbPaBwaZn91rOEl+9onPaeY0mrh3Ra8jdTaxJU0RKCEwu9h QaEXQIuIQxF7PDCPCk2x/vK9ZnNOe7wJXaNE3wAYBZEhf9+dJma8nxSxpRKvbAc= =dAjd -----END PGP SIGNATURE----- --48b1O0sxe3SB8CghHBoAuuxXPtOH7KIu3--