- Fix shadow property access (fdo #28835)

This commit is contained in:
Daniel Williams 2010-06-30 05:43:04 +00:00
parent fa93063cf5
commit 6a686ef928
2 changed files with 38 additions and 2 deletions

View File

@ -0,0 +1,30 @@
From b2c9478f9be1c8cf0d89a2391eb4da91b2940040 Mon Sep 17 00:00:00 2001
From: Dan Williams <dcbw@redhat.com>
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

View File

@ -8,7 +8,7 @@
Summary: GLib bindings for D-Bus
Name: dbus-glib
Version: 0.86
Release: 2%{?dist}
Release: 3%{?dist}
URL: http://www.freedesktop.org/software/dbus/
#VCS: git:git://git.freedesktop.org/git/dbus/dbus-glib
Source0: http://dbus.freedesktop.org/releases/dbus-glib/%{name}-%{version}.tar.gz
@ -26,6 +26,9 @@ BuildRequires: glib2-devel >= %{glib2_version}
BuildRequires: gettext
BuildRequires: gobject-introspection-devel
# https://bugs.freedesktop.org/show_bug.cgi?id=28835
Patch0: 0001-Fix-lookup-of-regular-properties-when-shadow-propert.patch
%description
D-Bus add-on library to integrate the standard D-Bus library with
@ -59,7 +62,7 @@ D-Bus tools written using the gtk+ GUI libaries
%prep
%setup -q
%patch0 -p1
%build
%configure --disable-tests \
@ -122,6 +125,9 @@ rm -rf %{buildroot}
%endif
%changelog
* Tue Jun 29 2010 Dan Williams <dcbw@redhat.com> - 0.86-3
- Fix shadow property access (fdo #28835)
* Tue Jun 29 2010 Bastien Nocera <bnocera@redhat.com> 0.86-2
- Add introspection data from gir-repository
- Remove unneeded autotools calls