wireless/bluetooth: fix double buffer free
Signed-off-by: Petro Karashchenko <petro.karashchenko@gmail.com>
This commit is contained in:
parent
d50ec662be
commit
756e244b18
|
@ -252,7 +252,6 @@ static void hci_acl(FAR struct bt_buf_s *buf)
|
|||
{
|
||||
wlerr("ERROR: ACL data length mismatch (%u != %u)\n",
|
||||
buf->len, len);
|
||||
bt_buf_release(buf);
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -261,12 +260,10 @@ static void hci_acl(FAR struct bt_buf_s *buf)
|
|||
{
|
||||
wlerr("ERROR: Unable to find conn for handle %u\n",
|
||||
buf->u.acl.handle);
|
||||
bt_buf_release(buf);
|
||||
return;
|
||||
}
|
||||
|
||||
bt_conn_receive(conn, buf, flags);
|
||||
bt_conn_release(conn);
|
||||
}
|
||||
|
||||
/* HCI event processing */
|
||||
|
@ -964,8 +961,6 @@ static void hci_event(FAR struct bt_buf_s *buf)
|
|||
wlwarn("WARNING: Unhandled event 0x%02x\n", hdr->evt);
|
||||
break;
|
||||
}
|
||||
|
||||
bt_buf_release(buf);
|
||||
}
|
||||
#endif
|
||||
|
||||
|
@ -1075,7 +1070,6 @@ static void hci_rx_work(FAR void *arg)
|
|||
|
||||
default:
|
||||
wlerr("ERROR: Unknown buf type %u\n", buf->type);
|
||||
bt_buf_release(buf);
|
||||
break;
|
||||
}
|
||||
#else
|
||||
|
|
Loading…
Reference in New Issue