diff --git a/gio/tests/glistmodel.c b/gio/tests/glistmodel.c index b867bd54a..562037f62 100644 --- a/gio/tests/glistmodel.c +++ b/gio/tests/glistmodel.c @@ -798,6 +798,7 @@ test_store_past_end (void) g_assert_cmpint (g_list_model_get_n_items (model), ==, 1); item = g_list_model_get_item (model, 0); g_assert_nonnull (item); + g_object_unref (item); item = g_list_model_get_item (model, G_MAXUINT); g_assert_null (item); diff --git a/glib/tests/autoptr.c b/glib/tests/autoptr.c index d24ad1ed8..fccdfe55e 100644 --- a/glib/tests/autoptr.c +++ b/glib/tests/autoptr.c @@ -409,9 +409,11 @@ test_g_rec_mutex_locker (void) g_thread_join (thread); } - /* Verify that the mutex is unlocked again */ - thread = g_thread_new ("rec mutex unlocked", rec_mutex_unlocked_thread, &rec_mutex); - g_thread_join (thread); + /* Verify that the mutex is unlocked again */ + thread = g_thread_new ("rec mutex unlocked", rec_mutex_unlocked_thread, &rec_mutex); + g_thread_join (thread); + + g_rec_mutex_clear (&rec_mutex); } /* Thread function to check that an rw lock given in @data cannot be writer locked */ @@ -478,6 +480,8 @@ test_g_rw_lock_lockers (void) * the locks taken above have been correctly released. */ g_assert_true (g_rw_lock_writer_trylock (&lock)); g_rw_lock_writer_unlock (&lock); + + g_rw_lock_clear (&lock); } static void