From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:54329) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bKoPO-000327-9R for qemu-devel@nongnu.org; Wed, 06 Jul 2016 11:06:39 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bKoPJ-0005LJ-CQ for qemu-devel@nongnu.org; Wed, 06 Jul 2016 11:06:37 -0400 Received: from mx1.redhat.com ([209.132.183.28]:48968) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bKoPJ-0005L6-7N for qemu-devel@nongnu.org; Wed, 06 Jul 2016 11:06:33 -0400 From: Markus Armbruster References: <1467636059-12557-1-git-send-email-pbonzini@redhat.com> <87oa6adel0.fsf@dusky.pond.sub.org> <218c7eb2-9dba-24e1-24aa-dd36d16104ab@redhat.com> Date: Wed, 06 Jul 2016 17:06:30 +0200 In-Reply-To: <218c7eb2-9dba-24e1-24aa-dd36d16104ab@redhat.com> (Paolo Bonzini's message of "Wed, 6 Jul 2016 16:45:02 +0200") Message-ID: <87zipu956x.fsf@dusky.pond.sub.org> MIME-Version: 1.0 Content-Type: text/plain 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 Cc: xiecl.fnst@cn.fujitsu.com, qemu-devel@nongnu.org Paolo Bonzini writes: > On 06/07/2016 16:30, Markus Armbruster wrote: >> Paolo Bonzini writes: >> >>> 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. >>> >>> Reported-by: Changlong Xie >>> Signed-off-by: Paolo Bonzini >> >> Reviewed-by: Markus Armbruster >> >> Want me to do the pull request? > > I'm doing one tomorrow, so your choice. Please include it in your pull request then.