diff options
author | Tedd Ho-Jeong An <hj.tedd.an@gmail.com> | 2020-11-20 12:07:08 -0800 |
---|---|---|
committer | Luiz Augusto von Dentz <luiz.von.dentz@intel.com> | 2020-11-24 13:03:46 -0800 |
commit | fb95196edf34b11af8265a74f49b0f9d37b8ec43 (patch) | |
tree | b4a13b2d6952ce1e2ec1b7fec84d68ed7f753f7b /monitor/l2cap.c | |
parent | 66affa10d820e1fda19cbcea668a8e3d63d887f0 (diff) | |
download | bluez-fb95196edf34b11af8265a74f49b0f9d37b8ec43.tar.gz |
monitor: Fix the unchecked return value
This patch fixes the unchecked return value.
Diffstat (limited to 'monitor/l2cap.c')
-rw-r--r-- | monitor/l2cap.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/monitor/l2cap.c b/monitor/l2cap.c index ca1997a0c..f16f82532 100644 --- a/monitor/l2cap.c +++ b/monitor/l2cap.c @@ -3243,6 +3243,9 @@ void l2cap_frame(uint16_t index, bool in, uint16_t handle, uint16_t cid, case L2CAP_MODE_LE_FLOWCTL: case L2CAP_MODE_ECRED: chan = get_chan(&frame); + if (!chan) + return; + if (!chan->sdu) { if (!l2cap_frame_get_le16(&frame, &chan->sdu)) return; |