Re: [Qemu-devel] [PATCH] json-streamer: fix double-free on exiting during a parse

2016-07-06 Thread Markus Armbruster
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,

Re: [Qemu-devel] [PATCH] json-streamer: fix double-free on exiting during a parse

2016-07-06 Thread Paolo Bonzini
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 GQueu

Re: [Qemu-devel] [PATCH] json-streamer: fix double-free on exiting during a parse

2016-07-06 Thread Markus Armbruster
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 >

Re: [Qemu-devel] [PATCH] json-streamer: fix double-free on exiting during a parse

2016-07-05 Thread Eric Blake
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

Re: [Qemu-devel] [PATCH] json-streamer: fix double-free on exiting during a parse

2016-07-05 Thread Fam Zheng
On Tue, 07/05 15:16, Changlong Xie wrote: > On 07/05/2016 02:56 PM, Fam Zheng wrote: > > On Mon, 07/04 14:40, 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 th

Re: [Qemu-devel] [PATCH] json-streamer: fix double-free on exiting during a parse

2016-07-05 Thread Changlong Xie
On 07/05/2016 02:56 PM, Fam Zheng wrote: On Mon, 07/04 14:40, 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

Re: [Qemu-devel] [PATCH] json-streamer: fix double-free on exiting during a parse

2016-07-04 Thread Fam Zheng
On Mon, 07/04 14:40, 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 pl

[Qemu-devel] [PATCH] json-streamer: fix double-free on exiting during a parse

2016-07-04 Thread Paolo Bonzini
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. R