diff options
author | Andrei Emeltchenko <andrei.emeltchenko@intel.com> | 2012-10-25 08:20:51 -0400 |
---|---|---|
committer | Gustavo Padovan <gustavo.padovan@collabora.co.uk> | 2012-11-01 18:27:03 -0400 |
commit | e9b02748ffc043e8a36f7893bbf58bb886f0b7e4 (patch) | |
tree | e93a717d7661a988ad657724c74e30d9f02ae6fd /net/bluetooth | |
parent | 27695fb415ab150e1972a882c2538bf9bf130cb0 (diff) |
Bluetooth: Add put(hcon) when deleting hchan
When refcnt reaches zero disconnect timeout will run and hci_conn
will be disconnected.
Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
Acked-by: Marcel Holtmann <marcel@holtmann.org>
Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
Diffstat (limited to 'net/bluetooth')
-rw-r--r-- | net/bluetooth/hci_conn.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/net/bluetooth/hci_conn.c b/net/bluetooth/hci_conn.c index dc331ceca471..25bfce0666eb 100644 --- a/net/bluetooth/hci_conn.c +++ b/net/bluetooth/hci_conn.c | |||
@@ -980,6 +980,8 @@ void hci_chan_del(struct hci_chan *chan) | |||
980 | 980 | ||
981 | synchronize_rcu(); | 981 | synchronize_rcu(); |
982 | 982 | ||
983 | hci_conn_put(conn); | ||
984 | |||
983 | skb_queue_purge(&chan->data_q); | 985 | skb_queue_purge(&chan->data_q); |
984 | kfree(chan); | 986 | kfree(chan); |
985 | } | 987 | } |