summaryrefslogtreecommitdiff
path: root/glib/deprecated
diff options
context:
space:
mode:
authorMilan Crha <mcrha@redhat.com>2013-07-22 09:54:33 +0200
committerMilan Crha <mcrha@redhat.com>2013-07-22 09:54:33 +0200
commit64041ca498a6115eb3a6f32c0fb2a3bec3c9fd88 (patch)
tree419666fc8e7e976ad434a32814a9978423edcb3f /glib/deprecated
parent114b1ccf78849988567011c36dd5e868a66a3431 (diff)
downloadglib-64041ca498a6115eb3a6f32c0fb2a3bec3c9fd88.tar.gz
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
Diffstat (limited to 'glib/deprecated')
-rw-r--r--glib/deprecated/gthread-deprecated.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/glib/deprecated/gthread-deprecated.c b/glib/deprecated/gthread-deprecated.c
index c89d22a44..89dba4dfe 100644
--- a/glib/deprecated/gthread-deprecated.c
+++ b/glib/deprecated/gthread-deprecated.c
@@ -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);