summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard Hughes <richard@hughsie.com>2016-09-14 12:45:48 +0100
committerRichard Hughes <richard@hughsie.com>2017-01-17 10:36:19 +0000
commit21401db4cc178fe1bc5ac56ca97912baf4d2e5d9 (patch)
tree7c819e6a8275d5a59614391a8e25c18f71f8dd0e
parente5cf45787bbe2cf7ede3c6650e5013f2c3887174 (diff)
downloadappstream-glib-21401db4cc178fe1bc5ac56ca97912baf4d2e5d9.tar.gz
trivial: Make as_profile_clear() threadsafe
-rw-r--r--libappstream-glib/as-profile.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/libappstream-glib/as-profile.c b/libappstream-glib/as-profile.c
index 422e618..b2f3240 100644
--- a/libappstream-glib/as-profile.c
+++ b/libappstream-glib/as-profile.c
@@ -233,6 +233,7 @@ as_profile_sort_cb (gconstpointer a, gconstpointer b)
void
as_profile_clear (AsProfile *profile)
{
+ g_autoptr(GMutexLocker) locker = g_mutex_locker_new (&profile->mutex);
g_ptr_array_set_size (profile->archived, 0);
}