[PATCH spice-server 1/2] test-stream-device: Remove interface before next loop

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

 



We should not reuse the same interface twice as doing so will
cause dandling pointers.
Unregister it at every iteration.

Signed-off-by: Frediano Ziglio <fziglio@xxxxxxxxxx>
---
 server/tests/test-stream-device.c | 1 +
 1 file changed, 1 insertion(+)

This avoids next patch to cause failure during tests.

diff --git a/server/tests/test-stream-device.c b/server/tests/test-stream-device.c
index e63952ac..ce37822f 100644
--- a/server/tests/test-stream-device.c
+++ b/server/tests/test-stream-device.c
@@ -342,6 +342,7 @@ static void test_stream_device(TestFixture *fixture, gconstpointer user_data)
         g_assert(message_sizes_curr - message_sizes == 5 || !device_enabled);
 
         check_vmc_error_message();
+        spice_server_remove_interface(&vmc_instance.base);
     }
 }
 
-- 
2.20.1

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




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