提交 3d72f9a2 编写于 作者: L Luiz Capitulino 提交者: Anthony Liguori

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: NLuiz Capitulino <lcapitulino@redhat.com>
Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
上级 514d97de
......@@ -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);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册