Bluetooth: Add put(hcon) when deleting hchan
authorAndrei Emeltchenko <andrei.emeltchenko@intel.com>
Thu, 25 Oct 2012 12:20:51 +0000 (15:20 +0300)
committerGustavo Padovan <gustavo.padovan@collabora.co.uk>
Thu, 1 Nov 2012 22:27:03 +0000 (20:27 -0200)
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>
net/bluetooth/hci_conn.c

index dc331ce..25bfce0 100644 (file)
@@ -980,6 +980,8 @@ void hci_chan_del(struct hci_chan *chan)
 
        synchronize_rcu();
 
+       hci_conn_put(conn);
+
        skb_queue_purge(&chan->data_q);
        kfree(chan);
 }