summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard Hughes <richard@hughsie.com>2016-09-14 12:45:48 +0100
committerRichard Hughes <richard@hughsie.com>2016-09-14 12:45:48 +0100
commit8c2fcbfd9456bc1d11ef94ea66e37509ac7f6af7 (patch)
tree5ca01d7ef52c076bacbecfe0470cb84e2c009a3a
parentae24601b7372c328c3dcecf48dc627d2eb3ea899 (diff)
downloadappstream-glib-8c2fcbfd9456bc1d11ef94ea66e37509ac7f6af7.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 035ab51..a99a047 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);
}