summaryrefslogtreecommitdiff
path: root/gio/gsubprocess.c
diff options
context:
space:
mode:
authorOlivier CrĂȘte <olivier.crete@collabora.com>2014-02-15 02:23:29 -0500
committerOlivier CrĂȘte <olivier.crete@collabora.com>2014-02-16 19:59:44 -0500
commited017994c9396f10c87646b5fa3639e1ca1925b8 (patch)
tree57bfc6552e58530e204468884fd477ee7ef74108 /gio/gsubprocess.c
parenta732f2966d114a040a2958084252b697b1f29f29 (diff)
downloadglib-ed017994c9396f10c87646b5fa3639e1ca1925b8.tar.gz
glib-ed017994c9396f10c87646b5fa3639e1ca1925b8.tar.bz2
glib-ed017994c9396f10c87646b5fa3639e1ca1925b8.zip
subprocess: Init and clear the mutex
Fixes the leak of the GMutexImpl allocated inside the first call to g_mutex_lock() on an uninitialized GMutex. https://bugzilla.gnome.org/show_bug.cgi?id=724401
Diffstat (limited to 'gio/gsubprocess.c')
-rw-r--r--gio/gsubprocess.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/gio/gsubprocess.c b/gio/gsubprocess.c
index 01470cc2a..c0f83674e 100644
--- a/gio/gsubprocess.c
+++ b/gio/gsubprocess.c
@@ -610,12 +610,15 @@ g_subprocess_finalize (GObject *object)
g_clear_object (&self->stderr_pipe);
g_strfreev (self->argv);
+ g_mutex_clear (&self->pending_waits_lock);
+
G_OBJECT_CLASS (g_subprocess_parent_class)->finalize (object);
}
static void
g_subprocess_init (GSubprocess *self)
{
+ g_mutex_init (&self->pending_waits_lock);
}
static void