mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-10-07 06:00:06 +02:00
glib/tests: fix leaks
https://bugzilla.gnome.org/show_bug.cgi?id=682560
This commit is contained in:
@@ -96,6 +96,7 @@ static void
|
||||
test_signal (int signum)
|
||||
{
|
||||
GMainLoop *mainloop;
|
||||
int id;
|
||||
|
||||
mainloop = g_main_loop_new (NULL, FALSE);
|
||||
|
||||
@@ -103,10 +104,11 @@ test_signal (int signum)
|
||||
g_unix_signal_add (signum, on_sig_received, mainloop);
|
||||
kill (getpid (), signum);
|
||||
g_assert (!sig_received);
|
||||
g_timeout_add (5000, sig_not_received, mainloop);
|
||||
id = g_timeout_add (5000, sig_not_received, mainloop);
|
||||
g_main_loop_run (mainloop);
|
||||
g_assert (sig_received);
|
||||
sig_received = FALSE;
|
||||
g_source_remove (id);
|
||||
|
||||
/* Ensure we don't get double delivery */
|
||||
g_timeout_add (500, exit_mainloop, mainloop);
|
||||
|
Reference in New Issue
Block a user