mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-01-13 07:56:17 +01:00
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
This commit is contained in:
parent
a732f2966d
commit
ed017994c9
@ -610,12 +610,15 @@ g_subprocess_finalize (GObject *object)
|
|||||||
g_clear_object (&self->stderr_pipe);
|
g_clear_object (&self->stderr_pipe);
|
||||||
g_strfreev (self->argv);
|
g_strfreev (self->argv);
|
||||||
|
|
||||||
|
g_mutex_clear (&self->pending_waits_lock);
|
||||||
|
|
||||||
G_OBJECT_CLASS (g_subprocess_parent_class)->finalize (object);
|
G_OBJECT_CLASS (g_subprocess_parent_class)->finalize (object);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
g_subprocess_init (GSubprocess *self)
|
g_subprocess_init (GSubprocess *self)
|
||||||
{
|
{
|
||||||
|
g_mutex_init (&self->pending_waits_lock);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
Loading…
Reference in New Issue
Block a user