From c9e9e37d84d63c5a721313fb2ccde663d186b555 Mon Sep 17 00:00:00 2001 From: David King Date: Mon, 11 Nov 2013 14:19:34 +0000 Subject: [PATCH] Fix leak in CheeseCameraDeviceMonitor test --- tests/cheese-test-monitor.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tests/cheese-test-monitor.c b/tests/cheese-test-monitor.c index db3b52d3..1afb871a 100644 --- a/tests/cheese-test-monitor.c +++ b/tests/cheese-test-monitor.c @@ -26,6 +26,7 @@ int main (int argc, char **argv) { CheeseCameraDeviceMonitor *monitor; + GMainLoop *mainloop; if (!cheese_init (&argc, &argv)) return EXIT_FAILURE; @@ -37,7 +38,9 @@ main (int argc, char **argv) G_CALLBACK (removed_cb), NULL); cheese_camera_device_monitor_coldplug (monitor); - g_main_loop_run (g_main_loop_new (NULL, FALSE)); + mainloop = g_main_loop_new (NULL, FALSE); + g_main_loop_run (mainloop); + g_main_loop_unref (mainloop); return EXIT_SUCCESS; } -- 2.11.4.GIT