mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2024-12-25 15:06:14 +01:00
g_thread_create_full() can dereference NULL pointer
In case of the thread creation failure, and the thread was not created as joinable, the g_thread_create_full() could dereference a NULL pointer. https://bugzilla.gnome.org/show_bug.cgi?id=704523
This commit is contained in:
parent
114b1ccf78
commit
64041ca498
@ -374,7 +374,7 @@ g_thread_create_full (GThreadFunc func,
|
||||
thread = g_thread_new_internal (NULL, g_deprecated_thread_proxy,
|
||||
func, data, stack_size, error);
|
||||
|
||||
if (!joinable)
|
||||
if (thread && !joinable)
|
||||
{
|
||||
thread->joinable = FALSE;
|
||||
g_thread_unref (thread);
|
||||
|
Loading…
Reference in New Issue
Block a user