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