From eeb4d5939de9be9edd22c9f7fc4bac32a1505ff6 Mon Sep 17 00:00:00 2001 From: Tor Lillqvist Date: Fri, 9 Jan 2009 10:37:31 +0000 Subject: [PATCH] Bug 567138 - get_package_directory_from_module() does not free its lock 2009-01-09 Tor Lillqvist Bug 567138 - get_package_directory_from_module() does not free its lock when failing * glib/gwin32.c (get_package_directory_from_module): Obvious fix. svn path=/trunk/; revision=7794 --- ChangeLog | 7 +++++++ glib/gwin32.c | 11 ++++++++--- 2 files changed, 15 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index de4b958c9..38610a86d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2009-01-09 Tor Lillqvist + + Bug 567138 - get_package_directory_from_module() does not free its + lock when failing + + * glib/gwin32.c (get_package_directory_from_module): Obvious fix. + 2009-01-05 Matthias Clasen * configure.in: Bump version diff --git a/glib/gwin32.c b/glib/gwin32.c index abca34787..ce905ae57 100644 --- a/glib/gwin32.c +++ b/glib/gwin32.c @@ -298,14 +298,19 @@ get_package_directory_from_module (const gchar *module_name) hmodule = GetModuleHandleW (wc_module_name); g_free (wc_module_name); - if (!hmodule) - return NULL; + if (!hmodule){ + G_UNLOCK (module_dirs); + return NULL; + } } fn = g_win32_get_package_installation_directory_of_module (hmodule); if (fn == NULL) - return NULL; + { + G_UNLOCK (module_dirs); + return NULL; + } g_hash_table_insert (module_dirs, module_name ? g_strdup (module_name) : "", fn);