From: Andrei Emeltchenko Date: Thu, 25 Oct 2012 12:20:51 +0000 (+0300) Subject: Bluetooth: Add put(hcon) when deleting hchan X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=e9b02748ffc043e8a36f7893bbf58bb886f0b7e4;p=openwrt%2Fstaging%2Fblogic.git 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 Acked-by: Marcel Holtmann Signed-off-by: Gustavo Padovan --- 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) synchronize_rcu(); + hci_conn_put(conn); + skb_queue_purge(&chan->data_q); kfree(chan); }