summaryrefslogtreecommitdiff
path: root/gdbus
diff options
context:
space:
mode:
authorMarcel Holtmann <marcel@holtmann.org>2013-01-21 02:25:12 (GMT)
committerMarcel Holtmann <marcel@holtmann.org>2013-01-21 02:46:18 (GMT)
commitc1445c100e2523fb4d8fcdf8a3cc0c1cd6769e4a (patch)
tree514b91610b16bf4c66c29d4530d409b6281ed654 /gdbus
parent049758a2c2316d2f3df22235c8965b2e525db4cc (diff)
downloadconnman-c1445c100e2523fb4d8fcdf8a3cc0c1cd6769e4a.zip
connman-c1445c100e2523fb4d8fcdf8a3cc0c1cd6769e4a.tar.gz
connman-c1445c100e2523fb4d8fcdf8a3cc0c1cd6769e4a.tar.bz2
gdbus: Check for valid path before handling properties
Diffstat (limited to 'gdbus')
-rw-r--r--gdbus/object.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/gdbus/object.c b/gdbus/object.c
index 1a54b3f..3327cf4 100644
--- a/gdbus/object.c
+++ b/gdbus/object.c
@@ -1690,6 +1690,9 @@ void g_dbus_emit_property_changed(DBusConnection *connection,
struct generic_data *data;
struct interface_data *iface;
+ if (path == NULL)
+ return;
+
if (!dbus_connection_get_object_path_data(connection, path,
(void **) &data) || data == NULL)
return;
@@ -1724,6 +1727,9 @@ gboolean g_dbus_get_properties(DBusConnection *connection, const char *path,
struct generic_data *data;
struct interface_data *iface;
+ if (path == NULL)
+ return FALSE;
+
if (!dbus_connection_get_object_path_data(connection, path,
(void **) &data) || data == NULL)
return FALSE;