[glib] tests: fix leak in mainloop test
- From: Stefan Walter <stefw src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glib] tests: fix leak in mainloop test
- Date: Wed, 6 Nov 2013 09:17:30 +0000 (UTC)
commit 92b71825fd6b62e339b89159b2cfba8e5ca839c4
Author: Ryan Lortie <desrt desrt ca>
Date: Sun Mar 24 21:55:08 2013 -0400
tests: fix leak in mainloop test
Properly unref a pair of GSources in the unix-fd mainloop test.
valgrind was reporting these as 'still reachable' before (possibly due
to some residual pointers somewhere in memory), but when running with
G_DEBUG=cleanup they were properly reported as leaked.
glib/tests/mainloop.c | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
---
diff --git a/glib/tests/mainloop.c b/glib/tests/mainloop.c
index 2eaaa94..1acc3b4 100644
--- a/glib/tests/mainloop.c
+++ b/glib/tests/mainloop.c
@@ -1273,7 +1273,9 @@ test_unix_fd_source (void)
g_assert (in && out);
g_source_destroy (out_source);
+ g_source_unref (out_source);
g_source_destroy (in_source);
+ g_source_unref (in_source);
close (fds[1]);
close (fds[0]);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]