diff options
author | Luiz Capitulino | 2010-01-08 19:45:53 +0100 |
---|---|---|
committer | Anthony Liguori | 2010-01-12 20:24:52 +0100 |
commit | 3d72f9a2be640f368229d579e80ce4ef2a823e49 (patch) | |
tree | 41ad63128a49ddb0a2edfaff8a7998172dca4901 /monitor.c | |
parent | dma/sb16: make clang analyzer not complain (diff) | |
download | qemu-3d72f9a2be640f368229d579e80ce4ef2a823e49.tar.gz qemu-3d72f9a2be640f368229d579e80ce4ef2a823e49.tar.xz qemu-3d72f9a2be640f368229d579e80ce4ef2a823e49.zip |
QMP: Don't free async event's 'data'
The monitor_protocol_event() function will free the
event's data, this is wrong as 'data' management is up
to the caller.
Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Diffstat (limited to 'monitor.c')
-rw-r--r-- | monitor.c | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -365,8 +365,10 @@ void monitor_protocol_event(MonitorEvent event, QObject *data) qmp = qdict_new(); timestamp_put(qmp); qdict_put(qmp, "event", qstring_from_str(event_name)); - if (data) + if (data) { + qobject_incref(data); qdict_put_obj(qmp, "data", data); + } monitor_json_emitter(mon, QOBJECT(qmp)); QDECREF(qmp); |