Skip to content

Commit 5758a9e

Browse files
LuoZhongYaojhedberg
authored andcommitted
bluetooth: h5: Fix memory access error
According to the context information, the processing of net_buf_add_u8 within the get_evt_buf function is redundant and incorrect. Signed-off-by: ZhongYao Luo <[email protected]>
1 parent aba7dfe commit 5758a9e

File tree

1 file changed

+1
-8
lines changed
  • drivers/bluetooth/hci

1 file changed

+1
-8
lines changed

drivers/bluetooth/hci/h5.c

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -406,14 +406,7 @@ static void h5_process_complete_packet(u8_t *hdr)
406406

407407
static inline struct net_buf *get_evt_buf(u8_t evt)
408408
{
409-
struct net_buf *buf;
410-
411-
buf = bt_buf_get_evt(evt, false, K_NO_WAIT);
412-
if (buf) {
413-
net_buf_add_u8(h5.rx_buf, evt);
414-
}
415-
416-
return buf;
409+
return bt_buf_get_evt(evt, false, K_NO_WAIT);
417410
}
418411

419412
static void bt_uart_isr(struct device *unused)

0 commit comments

Comments
 (0)