dect
/
linux-2.6
Archived
13
0
Fork 0

Bluetooth: Fix memory leaks due to chan refcnt

When we queue delayed work we hold(chan) and delayed work
shall put(chan) after execution.

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
Signed-off-by: Gustavo Padovan <gustavo@padovan.org>
This commit is contained in:
Andrei Emeltchenko 2012-03-23 09:42:15 +02:00 committed by Gustavo Padovan
parent 9432496206
commit 8d7e1c7f7e
1 changed files with 3 additions and 0 deletions

View File

@ -1309,6 +1309,7 @@ static void l2cap_monitor_timeout(struct work_struct *work)
if (chan->retry_count >= chan->remote_max_tx) {
l2cap_send_disconn_req(chan->conn, chan, ECONNABORTED);
l2cap_chan_unlock(chan);
l2cap_chan_put(chan);
return;
}
@ -1317,6 +1318,7 @@ static void l2cap_monitor_timeout(struct work_struct *work)
l2cap_send_rr_or_rnr(chan, L2CAP_CTRL_POLL);
l2cap_chan_unlock(chan);
l2cap_chan_put(chan);
}
static void l2cap_retrans_timeout(struct work_struct *work)
@ -1336,6 +1338,7 @@ static void l2cap_retrans_timeout(struct work_struct *work)
l2cap_send_rr_or_rnr(chan, L2CAP_CTRL_POLL);
l2cap_chan_unlock(chan);
l2cap_chan_put(chan);
}
static void l2cap_drop_acked_frames(struct l2cap_chan *chan)