Explorar o código

Bluetooth: Fix memory leak of S-frames into L2CAP

l2cap_data_channel do not free the S-frame, so we free it here.

Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
Reviewed-by: João Paulo Rechi Vita <jprvita@profusion.mobi>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Gustavo F. Padovan %!s(int64=15) %!d(string=hai) anos
pai
achega
faaebd192e
Modificáronse 1 ficheiros con 1 adicións e 0 borrados
  1. 1 0
      net/bluetooth/l2cap.c

+ 1 - 0
net/bluetooth/l2cap.c

@@ -3522,6 +3522,7 @@ static inline int l2cap_data_channel_sframe(struct sock *sk, u16 rx_control, str
 		break;
 	}
 
+	kfree_skb(skb);
 	return 0;
 }