|
|
@@ -1910,10 +1910,13 @@ static struct rfcomm_session *rfcomm_process_rx(struct rfcomm_session *s)
|
|
|
/* Get data directly from socket receive queue without copying it. */
|
|
|
while ((skb = skb_dequeue(&sk->sk_receive_queue))) {
|
|
|
skb_orphan(skb);
|
|
|
- if (!skb_linearize(skb))
|
|
|
+ if (!skb_linearize(skb)) {
|
|
|
s = rfcomm_recv_frame(s, skb);
|
|
|
- else
|
|
|
+ if (!s)
|
|
|
+ break;
|
|
|
+ } else {
|
|
|
kfree_skb(skb);
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
if (s && (sk->sk_state == BT_CLOSED))
|