fix releaseing the WSF msg too early

pull/10666/head
paul-szczepanek-arm 2019-03-28 15:20:46 +00:00 committed by Martin Kojtal
parent 88d000e18e
commit 7894a9321d
1 changed files with 4 additions and 3 deletions

View File

@ -66,11 +66,12 @@ void hciTrSendAclData(void *pContext, uint8_t *pData)
HCI_PDUMP_TX_ACL(len, pData);
/* transmit ACL header and data */
if (hciDrvWrite(HCI_ACL_TYPE, len, pData) == len)
if (hciDrvWrite(HCI_ACL_TYPE, len, pData) != len)
{
/* free buffer */
hciCoreTxAclComplete(pContext, pData);
/* transport failure */
WSF_ASSERT(0);
}
/* pData is not freed as the hciDrvWrite took ownership of the WSF buffer */
}