[libgsystem] gs_file_get_path_cached: Unlock mutex on error



commit 3c63e8c0ddedba6610dabf06c34eaa72469e7e2c
Author: Alexander Larsson <alexl redhat com>
Date:   Fri Sep 27 09:48:20 2013 +0200

    gs_file_get_path_cached: Unlock mutex on error
    
    https://bugzilla.gnome.org/show_bug.cgi?id=708824

 gsystem-file-utils.c |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)
---
diff --git a/gsystem-file-utils.c b/gsystem-file-utils.c
index aef76e9..0be3e4d 100644
--- a/gsystem-file-utils.c
+++ b/gsystem-file-utils.c
@@ -809,7 +809,10 @@ gs_file_get_path_cached (GFile *file)
       else
         path = g_file_get_path (file);
       if (path == NULL)
-        return NULL;
+        {
+          G_UNLOCK (pathname_cache);
+          return NULL;
+        }
       g_object_set_qdata_full ((GObject*)file, _file_path_quark, (char*)path, (GDestroyNotify)g_free);
     }
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]