From b2c9478f9be1c8cf0d89a2391eb4da91b2940040 Mon Sep 17 00:00:00 2001 From: Dan Williams Date: Tue, 29 Jun 2010 21:19:25 -0700 Subject: [PATCH] Fix lookup of regular properties when shadow properties are used Only free the uscore converted name if there's actually a shadow property registered for this property; otherwise if there is no shadow property we free the uscore converted one and then return it immediately after. --- dbus/dbus-gobject.c | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) diff --git a/dbus/dbus-gobject.c b/dbus/dbus-gobject.c index 3344761..6a1aba4 100644 --- a/dbus/dbus-gobject.c +++ b/dbus/dbus-gobject.c @@ -945,7 +945,8 @@ lookup_property_name (GObject *object, if (shadow_props) { shadow_prop_name = g_strdup (g_hash_table_lookup (shadow_props, wincaps_propname)); - g_free (uscore_name); + if (shadow_prop_name) + g_free (uscore_name); } return shadow_prop_name ? shadow_prop_name : uscore_name; -- 1.7.0.1