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:
Luiz Augusto von Dentz 2015-11-26 13:14:58 +02:00 committed by Anas Nashif
commit 1725d14b31

View file

@ -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;