mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2024-12-25 15:06:14 +01:00
tests: Fix GRand leak in GMenuModel tests
This commit is contained in:
parent
4f81c9eb97
commit
9347c7630f
@ -1160,6 +1160,8 @@ do_modify (gpointer data)
|
|||||||
random_menu_change (menu, rand);
|
random_menu_change (menu, rand);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
g_rand_free (rand);
|
||||||
|
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1201,9 +1203,11 @@ test_dbus_threaded (void)
|
|||||||
|
|
||||||
for (i = 0; i < 10; i++)
|
for (i = 0; i < 10; i++)
|
||||||
{
|
{
|
||||||
menu[i] = random_menu_new (g_rand_new_with_seed (g_test_rand_int ()), 2);
|
GRand *rand = g_rand_new_with_seed (g_test_rand_int ());
|
||||||
|
menu[i] = random_menu_new (rand, 2);
|
||||||
call[i] = g_thread_new ("call", do_modify, menu[i]);
|
call[i] = g_thread_new ("call", do_modify, menu[i]);
|
||||||
export[i] = g_thread_new ("export", do_export, menu[i]);
|
export[i] = g_thread_new ("export", do_export, menu[i]);
|
||||||
|
g_rand_free (rand);
|
||||||
}
|
}
|
||||||
|
|
||||||
for (i = 0; i < 10; i++)
|
for (i = 0; i < 10; i++)
|
||||||
|
Loading…
Reference in New Issue
Block a user