mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-10-06 05:39:20 +02:00
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:
@@ -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);
|
||||
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user