From 0eb82133c519e7cc08ee6de2daef449581e4f9d6 Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Sat, 16 Dec 2006 04:28:43 +0000 Subject: [PATCH] Fri Dec 15 2006 Matthias Clasen * gtype.c (instance_real_class_get): Dereference the pointer before dropping the lock. (#378078, Jonathan Matthew) --- gobject/ChangeLog | 5 +++++ gobject/gtype.c | 4 +++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/gobject/ChangeLog b/gobject/ChangeLog index 7244434..6a266ec 100644 --- a/gobject/ChangeLog +++ b/gobject/ChangeLog @@ -1,3 +1,8 @@ +Fri Dec 15 2006 Matthias Clasen + + * gtype.c (instance_real_class_get): Dereference the pointer + before dropping the lock. (#378078, Jonathan Matthew) + Tue Oct 10 12:06:08 2006 Tim Janik * glib-mkenums.in: diff --git a/gobject/gtype.c b/gobject/gtype.c index 12ce66f..44620db 100644 --- a/gobject/gtype.c +++ b/gobject/gtype.c @@ -1511,11 +1511,13 @@ static inline GTypeClass* instance_real_class_get (gpointer instance) { InstanceRealClass key, *node; + GTypeClass *class; key.instance = instance; G_LOCK (instance_real_class); node = instance_real_class_bsa ? g_bsearch_array_lookup (instance_real_class_bsa, &instance_real_class_bconfig, &key) : NULL; + class = node ? node->class : NULL; G_UNLOCK (instance_real_class); - return node ? node->class : NULL; + return class; } GTypeInstance* -- 2.7.4