Received: from eggs.gnu.org ([2001:4830:134:3::10]:46513) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bKo4a-0002DI-Rf for qemu-devel@nongnu.org; Wed, 06 Jul 2016 10:45:13 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bKo4Y-0007v9-UY for qemu-devel@nongnu.org; Wed, 06 Jul 2016 10:45:07 -0400 Received: from mx1.redhat.com ([209.132.183.28]:54848) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bKo4Y-0007v4-OO for qemu-devel@nongnu.org; Wed, 06 Jul 2016 10:45:06 -0400 References: <1467636059-12557-1-git-send-email-pbonzini@redhat.com> <87oa6adel0.fsf@dusky.pond.sub.org> From: Paolo Bonzini Message-ID: <218c7eb2-9dba-24e1-24aa-dd36d16104ab@redhat.com> Date: Wed, 6 Jul 2016 16:45:02 +0200 MIME-Version: 1.0 In-Reply-To: <87oa6adel0.fsf@dusky.pond.sub.org> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit 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: Markus Armbruster Cc: qemu-devel@nongnu.org, xiecl.fnst@cn.fujitsu.com 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. Paolo