diff options
author | Philip Withnall <philip@tecnocode.co.uk> | 2014-12-10 23:41:11 +0000 |
---|---|---|
committer | Philip Withnall <philip@tecnocode.co.uk> | 2014-12-10 23:42:59 +0000 |
commit | 5b28350d3229d36d7c64084e52f5a40ee5903723 (patch) | |
tree | b19891ff9e475ecb63a449dd4f82718d4023d457 | |
parent | 3019eb8cbbcac06055ee1fe6543f168c5bb53604 (diff) | |
download | gnome-desktop-5b28350d3229d36d7c64084e52f5a40ee5903723.tar.gz |
thumbnail: Fix a code path where the mutex is never unlocked
Fix one unusual code path where the GnomeDesktopThumbnailFactory’s mutex
is not unlocked before the function returns. As well as the usual
deadlock issues, this would lead to an abort on shutdown with recent
GLib changes, as g_mutex_clear() would be called on the locked mutex,
which GLib now (correctly) complains about.
https://bugzilla.gnome.org/show_bug.cgi?id=740666
-rw-r--r-- | libgnome-desktop/gnome-desktop-thumbnail.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/libgnome-desktop/gnome-desktop-thumbnail.c b/libgnome-desktop/gnome-desktop-thumbnail.c index eb50f371..7a1963bd 100644 --- a/libgnome-desktop/gnome-desktop-thumbnail.c +++ b/libgnome-desktop/gnome-desktop-thumbnail.c @@ -941,10 +941,11 @@ external_thumbnailers_disabled_changed_cb (GSettings *setting g_mutex_lock (&priv->lock); - if (priv->disabled) - return; - g_strfreev (priv->disabled_types); - priv->disabled_types = g_settings_get_strv (priv->settings, "disable"); + if (!priv->disabled) + { + g_strfreev (priv->disabled_types); + priv->disabled_types = g_settings_get_strv (priv->settings, "disable"); + } g_mutex_unlock (&priv->lock); } |