mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-09-01 06:21:52 -06:00
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
1 changed files with 2 additions and 0 deletions
|
@ -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…
Add table
Add a link
Reference in a new issue