[PATCH] server/tests/:fix free nonheap memmory attempt
Dmitry Frolov
frolov at swemel.ru
Thu Aug 8 13:55:38 UTC 2024
test_destroy() is trying to g_free(test->commands), which
was declared as global array.
Found by Linux Verification Center (linuxtesting.org) with SVACE.
Signed-off-by: Dmitry Frolov <frolov at swemel.ru>
---
server/tests/test-display-resolution-changes.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/server/tests/test-display-resolution-changes.c b/server/tests/test-display-resolution-changes.c
index ac8c959d..c1dbdca9 100644
--- a/server/tests/test-display-resolution-changes.c
+++ b/server/tests/test-display-resolution-changes.c
@@ -77,7 +77,9 @@ int main(void)
core->timer_start(ping_timer, ping_ms);
basic_event_loop_mainloop();
- test_destroy(test);
+ spice_server_destroy(test->server);
+ test->core->timer_remove(test->wakeup_timer);
+ g_free(test);
return 0;
}
--
2.34.1
More information about the Spice-devel
mailing list