« Previous | Next » 

Revision f24582d6

IDf24582d6ad8a080e008974c000bf0ae635d036ac

Added by Laszlo Ersek about 12 years ago

qapi: fix double free in qmp_output_visitor_cleanup()

Stack entries in QmpOutputVisitor are navigation links (weak references),
except the bottom (ie. least recently added) entry, which owns the root
QObject [1]. Make qmp_output_visitor_cleanup() drop the stack entries,
then release the QObject tree by the root.

Attempting to serialize an invalid enum inside a dictionary is an example
for triggering the double free.

[1] http://lists.nongnu.org/archive/html/qemu-devel/2012-03/msg03276.html

Signed-off-by: Laszlo Ersek <>
Signed-off-by: Luiz Capitulino <>

Files

  • added
  • modified
  • copied
  • renamed
  • deleted

View differences