[cheese] Fix leak in CheeseCameraDeviceMonitor test



commit c9e9e37d84d63c5a721313fb2ccde663d186b555
Author: David King <amigadave amigadave com>
Date:   Mon Nov 11 14:19:34 2013 +0000

    Fix leak in CheeseCameraDeviceMonitor test

 tests/cheese-test-monitor.c |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)
---
diff --git a/tests/cheese-test-monitor.c b/tests/cheese-test-monitor.c
index db3b52d..1afb871 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;
 }


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