various GLib tests: plug memory leaks

These don't really matter, since it's test code, but they do obscure
real leaks in the library.

Signed-off-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
Bug: https://bugzilla.gnome.org/show_bug.cgi?id=666115
Acked-by: Matthias Clasen <mclasen@redhat.com>
This commit is contained in:
Simon McVittie
2011-12-13 19:01:42 +00:00
parent a0f5e89aed
commit 29f2ced8eb
26 changed files with 137 additions and 20 deletions

View File

@@ -60,6 +60,7 @@ test_error (void)
g_assert_cmpint (errno, ==, EBADF);
g_assert (!res);
g_assert_error (error, G_UNIX_ERROR, 0);
g_clear_error (&error);
}
static gboolean sig_received = FALSE;
@@ -110,6 +111,7 @@ test_signal (int signum)
g_timeout_add (500, exit_mainloop, mainloop);
g_main_loop_run (mainloop);
g_assert (!sig_received);
g_main_loop_unref (mainloop);
}
@@ -138,6 +140,7 @@ test_sighup_add_remove (void)
g_source_remove (id);
kill (getpid (), SIGHUP);
g_assert (!sig_received);
g_main_loop_unref (mainloop);
}