Shouldn't this become NULL and exit the loop? It certainly doesn't...
Code:void DestroySymTab(struct SymTab *ATable) {
int i;
struct SymEntry *p;
for (i = 0; i < ATable->Size; i++) {
while(ATable->Contents[i] != NULL) {
p = (struct SymEntry*)ATable->Contents[i];
while(p->Next != NULL){
p = p->Next;
}
free(p);
p = NULL;
}
}
free(ATable);
};