summaryrefslogtreecommitdiff
path: root/plugins/bluetooth.c
diff options
context:
space:
mode:
authorJukka Rissanen <jukka.rissanen@linux.intel.com>2013-08-05 16:20:16 +0300
committerPatrik Flykt <patrik.flykt@linux.intel.com>2013-08-06 12:10:18 +0300
commit72fc5cf1e34f3087ca008218217e9fd7de0444eb (patch)
treef143067c7f047501b8f3fb9f6cbfb246e00cf879 /plugins/bluetooth.c
parentc27e223272b35ed25443a6da6409fafc6e43f9e4 (diff)
downloadconnman-72fc5cf1e34f3087ca008218217e9fd7de0444eb.tar.gz
bluetooth: Address pointer might be null when creating nap
Check pointer for null before dereferencing it.
Diffstat (limited to 'plugins/bluetooth.c')
-rw-r--r--plugins/bluetooth.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/plugins/bluetooth.c b/plugins/bluetooth.c
index 7fcf3fd8..82152c5a 100644
--- a/plugins/bluetooth.c
+++ b/plugins/bluetooth.c
@@ -337,6 +337,11 @@ static void pan_create_nap(struct bluetooth_pan *pan)
const char *name, *path;
address = proxy_get_string(pan->btdevice_proxy, "Address");
+ if (!address) {
+ connman_warn("Bluetooth device address missing");
+ return;
+ }
+
address2ident(address, ident);
pan->network = connman_network_create(ident,