summaryrefslogtreecommitdiff
path: root/plugins/bluetooth.c
diff options
context:
space:
mode:
authorJukka Rissanen <jukka.rissanen@linux.intel.com>2013-08-05 16:20:17 +0300
committerPatrik Flykt <patrik.flykt@linux.intel.com>2013-08-06 12:10:19 +0300
commitd6a3a39dd0c6a37f4158558b08f49d23eab8646b (patch)
treef0373b11c94a4ebcc46007ce7e4ebb24800714c5 /plugins/bluetooth.c
parent72fc5cf1e34f3087ca008218217e9fd7de0444eb (diff)
downloadconnman-d6a3a39dd0c6a37f4158558b08f49d23eab8646b.tar.gz
bluetooth: Check pointer for null before passing to strcmp()
Diffstat (limited to 'plugins/bluetooth.c')
-rw-r--r--plugins/bluetooth.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/plugins/bluetooth.c b/plugins/bluetooth.c
index 82152c5a..48a4a286 100644
--- a/plugins/bluetooth.c
+++ b/plugins/bluetooth.c
@@ -752,6 +752,11 @@ static void object_added(GDBusProxy *proxy, void *user_data)
const char *interface;
interface = g_dbus_proxy_get_interface(proxy);
+ if (!interface) {
+ connman_warn("Interface or proxy missing when adding "
+ "bluetooth object");
+ return;
+ }
if (strcmp(interface, "org.bluez.Adapter1") == 0) {
DBG("%s %s", interface, g_dbus_proxy_get_path(proxy));
@@ -771,6 +776,11 @@ static void object_removed(GDBusProxy *proxy, void *user_data)
const char *interface, *path;
interface = g_dbus_proxy_get_interface(proxy);
+ if (!interface) {
+ connman_warn("Interface or proxy missing when removing "
+ "bluetooth object");
+ return;
+ }
if (strcmp(interface, "org.bluez.Adapter1") == 0) {
path = g_dbus_proxy_get_path(proxy);