Browse Source

CIDER: Plug some memory leaks by adding to TWOdestroy()

pre-master-46
Holger Vogt 3 years ago
parent
commit
67b2ddbad5
  1. 13
      src/ciderlib/twod/twodest.c

13
src/ciderlib/twod/twodest.c

@ -66,9 +66,22 @@ TWOdestroy(TWOdevice *pDevice)
FREE( pElem );
}
FREE( pDevice->elements );
for (int xIndex = 1; xIndex < pDevice->numXNodes; xIndex++) {
FREE(pDevice->elemArray[xIndex]);
}
FREE( pDevice->elemArray );
}
if (pDevice->pMaterials) {
TWOmaterial* pMtmp = pDevice->pMaterials;
while (pMtmp) {
TWOmaterial* pMtmpnext = pMtmp->next;
FREE(pMtmp);
pMtmp = pMtmpnext;
}
}
/* destroy the contacts & channels */
/* NOT IMPLEMENTED */

Loading…
Cancel
Save