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 <LuoZhongYao@gmail.com>
This commit is contained in:
ZhongYao Luo 2019-12-03 12:53:06 +08:00 committed by Johan Hedberg
commit 5758a9e1c6

View file

@ -406,14 +406,7 @@ static void h5_process_complete_packet(u8_t *hdr)
static inline struct net_buf *get_evt_buf(u8_t evt)
{
struct net_buf *buf;
buf = bt_buf_get_evt(evt, false, K_NO_WAIT);
if (buf) {
net_buf_add_u8(h5.rx_buf, evt);
}
return buf;
return bt_buf_get_evt(evt, false, K_NO_WAIT);
}
static void bt_uart_isr(struct device *unused)