[glib/wip/gcleanup: 46/79] timeloop: Fix leaks in tests
- From: Stefan Walter <stefw src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glib/wip/gcleanup: 46/79] timeloop: Fix leaks in tests
- Date: Sun, 10 Nov 2013 15:23:23 +0000 (UTC)
commit 35e95aea45540bb596e038bff0bb560ccc3ed61b
Author: Stef Walter <stefw gnome org>
Date: Sat Nov 9 20:52:16 2013 +0100
timeloop: Fix leaks in tests
https://bugzilla.gnome.org/show_bug.cgi?id=711751
tests/timeloop.c | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
---
diff --git a/tests/timeloop.c b/tests/timeloop.c
index 457e74d..a2dc11f 100644
--- a/tests/timeloop.c
+++ b/tests/timeloop.c
@@ -152,6 +152,8 @@ create_child (void)
g_io_add_watch (out_channels[0], G_IO_IN | G_IO_HUP,
input_callback, in_channels[1]);
+ g_io_channel_unref (in_channels[0]);
+ g_io_channel_unref (out_channels[1]);
}
else if (pid == 0) /* Child */
{
@@ -212,5 +214,6 @@ main (int argc, char **argv)
difftimeval (&old_usage.ru_stime, &new_usage.ru_stime)) /
(n_iters * n_children));
+ g_main_loop_unref (loop);
return 0;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]