void cli_FreeContact(struct ClcContact *p) { if ( p->SubAllocated) { if ( p->subcontacts && !p->isSubcontact) { int i; for ( i = 0 ; i < p->SubAllocated ; i++ ) { Cache_DestroySmileyList(p->subcontacts[i].plText); // Cache_DestroySmileyList(p->subcontacts[i].plSecondLineText); // Cache_DestroySmileyList(p->subcontacts[i].plThirdLineText); // if (p->subcontacts[i].szSecondLineText) // mir_free(p->subcontacts[i].szSecondLineText); // if (p->subcontacts[i].szThirdLineText) // mir_free(p->subcontacts[i].szThirdLineText); } mir_free(p->subcontacts); } } Cache_DestroySmileyList(p->plText); p->plText=NULL; // Cache_DestroySmileyList(p->plSecondLineText); // p->plSecondLineText=NULL; // Cache_DestroySmileyList(p->plThirdLineText); // p->plThirdLineText=NULL; // if (p->szSecondLineText) // mir_free(p->szSecondLineText); // if (p->szThirdLineText) // mir_free(p->szThirdLineText); saveFreeContact( p ); }
void FreeContact(struct ClcContact *p) { if ( p->SubAllocated && !p->isSubcontact) mir_free(p->subcontacts); saveFreeContact( p ); }