Skip to content

Commit 7894a93

Browse files
paul-szczepanek-arm0xc0170
authored andcommitted
fix releaseing the WSF msg too early
1 parent 88d000e commit 7894a93

File tree

1 file changed

+4
-3
lines changed
  • features/FEATURE_BLE/targets/TARGET_CORDIO/stack_adaptation

1 file changed

+4
-3
lines changed

features/FEATURE_BLE/targets/TARGET_CORDIO/stack_adaptation/hci_tr.c

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -66,11 +66,12 @@ void hciTrSendAclData(void *pContext, uint8_t *pData)
6666
HCI_PDUMP_TX_ACL(len, pData);
6767

6868
/* transmit ACL header and data */
69-
if (hciDrvWrite(HCI_ACL_TYPE, len, pData) == len)
69+
if (hciDrvWrite(HCI_ACL_TYPE, len, pData) != len)
7070
{
71-
/* free buffer */
72-
hciCoreTxAclComplete(pContext, pData);
71+
/* transport failure */
72+
WSF_ASSERT(0);
7373
}
74+
/* pData is not freed as the hciDrvWrite took ownership of the WSF buffer */
7475
}
7576

7677

0 commit comments

Comments
 (0)