[gnome-software] Add missing locking to gs_app_get_url()
- From: Kalev Lember <klember src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-software] Add missing locking to gs_app_get_url()
- Date: Fri, 12 Apr 2019 09:47:17 +0000 (UTC)
commit b81ff409f82828d44f562beaf02590bf82170942
Author: Kalev Lember <klember redhat com>
Date: Fri Apr 12 11:43:32 2019 +0200
Add missing locking to gs_app_get_url()
https://bugzilla.redhat.com/show_bug.cgi?id=1699269
lib/gs-app.c | 2 ++
1 file changed, 2 insertions(+)
---
diff --git a/lib/gs-app.c b/lib/gs-app.c
index 0ba61a7d..ef65988a 100644
--- a/lib/gs-app.c
+++ b/lib/gs-app.c
@@ -2176,7 +2176,9 @@ const gchar *
gs_app_get_url (GsApp *app, AsUrlKind kind)
{
GsAppPrivate *priv = gs_app_get_instance_private (app);
+ g_autoptr(GMutexLocker) locker = NULL;
g_return_val_if_fail (GS_IS_APP (app), NULL);
+ locker = g_mutex_locker_new (&priv->mutex);
return g_hash_table_lookup (priv->urls, as_url_kind_to_string (kind));
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]