diff options
| author | Paolo Bonzini | 2016-07-04 14:40:59 +0200 |
|---|---|---|
| committer | Paolo Bonzini | 2016-07-12 18:31:27 +0200 |
| commit | a942d8fa01f65279cdc135f4294db611bbc088ef (patch) | |
| tree | 53b1a60d73631a374879b545ff7b8c8c95e3c615 /util | |
| parent | main-loop: check return value before using pointer (diff) | |
| download | qemu-a942d8fa01f65279cdc135f4294db611bbc088ef.tar.gz qemu-a942d8fa01f65279cdc135f4294db611bbc088ef.tar.xz qemu-a942d8fa01f65279cdc135f4294db611bbc088ef.zip | |
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>
Diffstat (limited to 'util')
0 files changed, 0 insertions, 0 deletions
