projects
/
platform
/
upstream
/
glib.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
b05bf77
)
Fixed g_mutex_clear() to fully undo g_mutex_init()
author
Jeffrey Stedfast
<fejj@gnome.org>
Sun, 30 Jun 2013 17:46:28 +0000
(13:46 -0400)
committer
Jeffrey Stedfast
<fejj@gnome.org>
Sun, 30 Jun 2013 17:46:28 +0000
(13:46 -0400)
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.
glib/gthread-posix.c
patch
|
blob
|
history
diff --git
a/glib/gthread-posix.c
b/glib/gthread-posix.c
index
23371ae
..
d57a9cb
100644
(file)
--- 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
+ * Sin
c
e: 2.32
*/
void
g_mutex_clear (GMutex *mutex)
{
g_mutex_impl_free (mutex->p);
+ mutex->p = NULL;
}
/**