[PATCH spice-server 3/5] tests: Avoid leaking list of commands

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Signed-off-by: Frediano Ziglio <fziglio@xxxxxxxxxx>
---
 server/tests/test-display-base.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/server/tests/test-display-base.c b/server/tests/test-display-base.c
index d95f19f5..d01fb36b 100644
--- a/server/tests/test-display-base.c
+++ b/server/tests/test-display-base.c
@@ -868,7 +868,7 @@ void test_set_simple_command_list(Test *test, const int *simple_commands, int nu
 {
     int i;
 
-    /* FIXME: leaks */
+    free(test->commands);
     test->commands = malloc(sizeof(*test->commands) * num_commands);
     memset(test->commands, 0, sizeof(*test->commands) * num_commands);
     test->num_commands = num_commands;
@@ -914,6 +914,7 @@ void test_destroy(Test *test)
 {
     test->core->timer_remove(test->wakeup_timer);
     spice_server_destroy(test->server);
+    free(test->commands);
     free(test);
 }
 
-- 
2.13.5

_______________________________________________
Spice-devel mailing list
Spice-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/spice-devel




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]     [Monitors]