tests: fix leak in test

This allows the test to pass under ASAN.
This commit is contained in:
Christian Hergert
2018-07-27 18:02:15 -07:00
parent 9e770999ee
commit bfac3ab762

View File

@ -97,7 +97,10 @@ test_basic (void)
sp_model_filter_set_filter_func (filter, filter_func2, NULL, NULL);
g_assert_cmpint (500, ==, g_list_model_get_n_items (G_LIST_MODEL (filter)));
g_list_store_append (model, test_item_new (1001));
{
g_autoptr(TestItem) freeme = test_item_new (1001);
g_list_store_append (model, freeme);
}
for (i = 0; i < 500; i++)
g_list_store_remove (model, 0);