Annotation of /trunk/dbus-glib/patches/dbus-glib-0.94-marshall_objs.patch
Parent Directory | Revision Log
Revision 1499 -
(hide annotations)
(download)
Fri Aug 26 18:15:52 2011 UTC (13 years, 1 month ago) by niro
File size: 1236 byte(s)
Fri Aug 26 18:15:52 2011 UTC (13 years, 1 month ago) by niro
File size: 1236 byte(s)
-fixes segfaults of networkmanager
1 | niro | 1499 | From 3e0828f57c3925ea9b63d22ab82d991a0fea0536 Mon Sep 17 00:00:00 2001 |
2 | From: Simon McVittie <simon.mcvittie@collabora.co.uk> | ||
3 | Date: Thu, 02 Jun 2011 12:49:51 +0000 | ||
4 | Subject: Fix regression in marshalling objects as object paths | ||
5 | |||
6 | This regressed while fixing fd.o #36811. NetworkManager apparently uses | ||
7 | this idiom. | ||
8 | |||
9 | Bug: https://bugs.freedesktop.org/show_bug.cgi?id=37852 | ||
10 | Bug-Debian: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=628890 | ||
11 | Tested-by: Michael Biebl <biebl@debian.org> | ||
12 | Reviewed-by: Colin Walters <walters@verbum.org> | ||
13 | --- | ||
14 | diff --git a/dbus/dbus-gobject.c b/dbus/dbus-gobject.c | ||
15 | index 3b0bd17..7ee0b4f 100644 | ||
16 | --- a/dbus/dbus-gobject.c | ||
17 | +++ b/dbus/dbus-gobject.c | ||
18 | @@ -3049,16 +3049,16 @@ out: | ||
19 | const char * | ||
20 | _dbus_gobject_get_path (GObject *obj) | ||
21 | { | ||
22 | - GSList *registrations; | ||
23 | + ObjectExport *oe; | ||
24 | ObjectRegistration *o; | ||
25 | |||
26 | - registrations = g_object_get_data (obj, "dbus_glib_object_registrations"); | ||
27 | + oe = g_object_get_data (obj, "dbus_glib_object_registrations"); | ||
28 | |||
29 | - if (registrations == NULL) | ||
30 | + if (oe == NULL || oe->registrations == NULL) | ||
31 | return NULL; | ||
32 | |||
33 | /* First one to have been registered wins */ | ||
34 | - o = registrations->data; | ||
35 | + o = oe->registrations->data; | ||
36 | |||
37 | return o->object_path; | ||
38 | } | ||
39 | -- | ||
40 | cgit v0.8.3-6-g21f6 |