summaryrefslogtreecommitdiff
path: root/android/pan.c
diff options
context:
space:
mode:
authorRavi kumar Veeramally <ravikumar.veeramally@linux.intel.com>2013-12-11 12:13:42 +0200
committerJohan Hedberg <johan.hedberg@intel.com>2013-12-11 15:27:40 +0200
commitbb700aaa91a5a7b7513f6856b7741a68c5e787b6 (patch)
tree05a9fda172df5ef09dae11754c0df31488d2e2d1 /android/pan.c
parent7db224f45e8e4d2de825c7ef2b18730925cef47c (diff)
downloadbluez-bb700aaa91a5a7b7513f6856b7741a68c5e787b6.tar.gz
android/pan: Fix missing cleanup calls
Diffstat (limited to 'android/pan.c')
-rw-r--r--android/pan.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/android/pan.c b/android/pan.c
index f74f1a721..93a31c81a 100644
--- a/android/pan.c
+++ b/android/pan.c
@@ -128,6 +128,8 @@ static gboolean bnep_watchdog_cb(GIOChannel *chan, GIOCondition cond,
DBG("%s disconnected", dev->iface);
+ bnep_if_down(dev->iface);
+ bnep_conndel(&dev->dst);
bt_pan_notify_conn_state(dev, HAL_PAN_STATE_DISCONNECTED);
pan_device_free(dev);
@@ -142,6 +144,7 @@ static void bnep_conn_cb(GIOChannel *chan, char *iface, int err, void *data)
if (err < 0) {
error("bnep connect req failed: %s", strerror(-err));
+ bnep_conndel(&dev->dst);
bt_pan_notify_conn_state(dev, HAL_PAN_STATE_DISCONNECTED);
pan_device_free(dev);
return;