Fix the Cider memory leaks from setupContacts. TWOdestroy needed to free the contact nodes.

This commit is contained in:
Brian Taylor 2023-06-29 17:43:34 -07:00 committed by Holger Vogt
parent f39f89ea9b
commit 25c1c971e5
1 changed files with 3 additions and 0 deletions

View File

@ -85,6 +85,9 @@ TWOdestroy(TWOdevice *pDevice)
struct sTWOcontact* pFCtmp = pDevice->pFirstContact; struct sTWOcontact* pFCtmp = pDevice->pFirstContact;
while (pFCtmp) { while (pFCtmp) {
struct sTWOcontact* pFCtmpnext = pFCtmp->next; struct sTWOcontact* pFCtmpnext = pFCtmp->next;
if (pFCtmp->pNodes) {
FREE(pFCtmp->pNodes);
}
FREE(pFCtmp); FREE(pFCtmp);
pFCtmp = pFCtmpnext; pFCtmp = pFCtmpnext;
} }