mirror of https://github.com/xemu-project/xemu.git
tests/qtest: Free unused QMP response
This fixes LeakSanitizer warnings. Signed-off-by: Akihiko Odaki <akihiko.odaki@daynix.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Message-ID: <20240627-san-v2-11-750bb0946dbd@daynix.com> Signed-off-by: Thomas Huth <thuth@redhat.com>
This commit is contained in:
parent
eefd26b876
commit
f48b7a4b69
|
@ -749,6 +749,8 @@ QDict *qtest_qmp_receive(QTestState *s)
|
||||||
response, s->eventData)) {
|
response, s->eventData)) {
|
||||||
/* Stash the event for a later consumption */
|
/* Stash the event for a later consumption */
|
||||||
s->pending_events = g_list_append(s->pending_events, response);
|
s->pending_events = g_list_append(s->pending_events, response);
|
||||||
|
} else {
|
||||||
|
qobject_unref(response);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue