summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeffrey Stedfast <fejj@gnome.org>2013-06-30 13:46:28 -0400
committerJeffrey Stedfast <fejj@gnome.org>2013-06-30 13:46:28 -0400
commit56348210f38209a11902e54b2db41833aab36414 (patch)
tree2f30e5d31839e43e474dbfb4535a10f8bbe68323
parentb05bf77223cffb025b8a24963d6149a755da43c0 (diff)
downloadglib-56348210f38209a11902e54b2db41833aab36414.tar.gz
Fixed g_mutex_clear() to fully undo g_mutex_init()
In order to fully undo the effects of g_mutex_init(), it is necessary to reset the internal mutex pointer back to NULL so that a later call to g_mutex_init() actually works as expected.
-rw-r--r--glib/gthread-posix.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/glib/gthread-posix.c b/glib/gthread-posix.c
index 23371ae0f..d57a9cb4b 100644
--- a/glib/gthread-posix.c
+++ b/glib/gthread-posix.c
@@ -184,12 +184,13 @@ g_mutex_init (GMutex *mutex)
* Calling g_mutex_clear() on a locked mutex leads to undefined
* behaviour.
*
- * Sine: 2.32
+ * Since: 2.32
*/
void
g_mutex_clear (GMutex *mutex)
{
g_mutex_impl_free (mutex->p);
+ mutex->p = NULL;
}
/**