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",
|
wlerr("ERROR: ACL data length mismatch (%u != %u)\n",
|
||||||
buf->len, len);
|
buf->len, len);
|
||||||
bt_buf_release(buf);
|
|
||||||
return;
|
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",
|
wlerr("ERROR: Unable to find conn for handle %u\n",
|
||||||
buf->u.acl.handle);
|
buf->u.acl.handle);
|
||||||
bt_buf_release(buf);
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
bt_conn_receive(conn, buf, flags);
|
bt_conn_receive(conn, buf, flags);
|
||||||
bt_conn_release(conn);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* HCI event processing */
|
/* 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);
|
wlwarn("WARNING: Unhandled event 0x%02x\n", hdr->evt);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
bt_buf_release(buf);
|
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -1075,7 +1070,6 @@ static void hci_rx_work(FAR void *arg)
|
||||||
|
|
||||||
default:
|
default:
|
||||||
wlerr("ERROR: Unknown buf type %u\n", buf->type);
|
wlerr("ERROR: Unknown buf type %u\n", buf->type);
|
||||||
bt_buf_release(buf);
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
|
|
Loading…
Reference in New Issue