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:
Akihiko Odaki 2024-06-27 22:37:54 +09:00 committed by Thomas Huth
parent eefd26b876
commit f48b7a4b69
1 changed files with 2 additions and 0 deletions

View File

@ -749,6 +749,8 @@ QDict *qtest_qmp_receive(QTestState *s)
response, s->eventData)) {
/* Stash the event for a later consumption */
s->pending_events = g_list_append(s->pending_events, response);
} else {
qobject_unref(response);
}
}
}