[cheese/gnome-3-10] Fix leak in CheeseCameraDeviceMonitor test
- From: David King <davidk src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [cheese/gnome-3-10] Fix leak in CheeseCameraDeviceMonitor test
- Date: Mon, 11 Nov 2013 18:37:11 +0000 (UTC)
commit cba9541a9dd3fe6235cd4ef1912927f93a5df95e
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]