mirror of git://git.sysmocom.de/ofono
gdbus: Check for valid path before handling properties
This commit is contained in:
parent
a419432c0f
commit
abb54f4aa5
|
@ -1690,6 +1690,9 @@ void g_dbus_emit_property_changed(DBusConnection *connection,
|
||||||
struct generic_data *data;
|
struct generic_data *data;
|
||||||
struct interface_data *iface;
|
struct interface_data *iface;
|
||||||
|
|
||||||
|
if (path == NULL)
|
||||||
|
return;
|
||||||
|
|
||||||
if (!dbus_connection_get_object_path_data(connection, path,
|
if (!dbus_connection_get_object_path_data(connection, path,
|
||||||
(void **) &data) || data == NULL)
|
(void **) &data) || data == NULL)
|
||||||
return;
|
return;
|
||||||
|
@ -1724,6 +1727,9 @@ gboolean g_dbus_get_properties(DBusConnection *connection, const char *path,
|
||||||
struct generic_data *data;
|
struct generic_data *data;
|
||||||
struct interface_data *iface;
|
struct interface_data *iface;
|
||||||
|
|
||||||
|
if (path == NULL)
|
||||||
|
return FALSE;
|
||||||
|
|
||||||
if (!dbus_connection_get_object_path_data(connection, path,
|
if (!dbus_connection_get_object_path_data(connection, path,
|
||||||
(void **) &data) || data == NULL)
|
(void **) &data) || data == NULL)
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
|
Loading…
Reference in New Issue