Bluetooth: L2CAP: Fix check of SDU buffer
Change-Id: I7522a8988b4b458d2f92813f12c10b1a54f3c88c Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
This commit is contained in:
parent
045bac2d4c
commit
1725d14b31
1 changed files with 1 additions and 1 deletions
|
@ -894,7 +894,7 @@ static void l2cap_chan_le_recv(struct bt_l2cap_chan *chan, struct net_buf *buf)
|
|||
/* Check if SDU needs segmentation */
|
||||
if (sdu_len > buf->len) {
|
||||
chan->_sdu = chan->ops->alloc_buf(chan);
|
||||
if (!chan) {
|
||||
if (!chan->_sdu) {
|
||||
BT_ERR("Unable to allocate buffer for SDU");
|
||||
bt_l2cap_chan_disconnect(chan);
|
||||
return;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue