qemu/qobject
Paolo Bonzini 2522f0fcd1 json-streamer: fix double-free on exiting during a parse
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 <xiecl.fnst@cn.fujitsu.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Message-Id: <1467636059-12557-1-git-send-email-pbonzini@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
(cherry picked from commit a942d8fa01)
Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
2016-08-04 16:34:29 -05:00
..
json-lexer.c qobject: Clean up includes 2016-02-04 17:41:30 +00:00
json-parser.c util: move declarations out of qemu-common.h 2016-03-22 22:20:17 +01:00
json-streamer.c json-streamer: fix double-free on exiting during a parse 2016-08-04 16:34:29 -05:00
Makefile.objs qobject: Simplify QObject 2015-12-17 08:21:28 +01:00
qbool.c qobject: Clean up includes 2016-02-04 17:41:30 +00:00
qdict.c util: move declarations out of qemu-common.h 2016-03-22 22:20:17 +01:00
qfloat.c qobject: Clean up includes 2016-02-04 17:41:30 +00:00
qint.c qobject: Clean up includes 2016-02-04 17:41:30 +00:00
qjson.c util: move declarations out of qemu-common.h 2016-03-22 22:20:17 +01:00
qlist.c qobject: Clean up includes 2016-02-04 17:41:30 +00:00
qnull.c qobject: Clean up includes 2016-02-04 17:41:30 +00:00
qobject.c qobject: Clean up includes 2016-02-04 17:41:30 +00:00
qstring.c qobject: Clean up includes 2016-02-04 17:41:30 +00:00