freeMagic1() additions
These additional uses of freeMagic() also require defer-by-one using stack storage (not global storage idiom, recently introduced). Not sure if they were missed original or new/modified code in the past 12 months. Some areas/line-of-code are not usually compiled, maybe that is why they were originally missed.
This commit is contained in:
parent
5e8a3f038a
commit
3b4d66e7d7
|
|
@ -814,7 +814,10 @@ main(
|
||||||
EFVisitDevs(simmergeVisit, PTR2CD(NULL));
|
EFVisitDevs(simmergeVisit, PTR2CD(NULL));
|
||||||
TxPrintf("Devices merged: %d\n", esDevsMerged);
|
TxPrintf("Devices merged: %d\n", esDevsMerged);
|
||||||
esFMIndex = 0;
|
esFMIndex = 0;
|
||||||
for (p = devMergeList; p != NULL; p = p->next) freeMagic((char *)p);
|
free_magic1_t mm1 = freeMagic1_init();
|
||||||
|
for (p = devMergeList; p != NULL; p = p->next)
|
||||||
|
freeMagic1(&mm1, (char *)p);
|
||||||
|
freeMagic1_end(&mm1);
|
||||||
}
|
}
|
||||||
|
|
||||||
EFVisitDevs(simdevVisit, PTR2CD(NULL));
|
EFVisitDevs(simdevVisit, PTR2CD(NULL));
|
||||||
|
|
|
||||||
|
|
@ -1345,9 +1345,12 @@ main(
|
||||||
TxPrintf("Devs merged: %d\n", esSpiceDevsMerged);
|
TxPrintf("Devs merged: %d\n", esSpiceDevsMerged);
|
||||||
esFMIndex = 0 ;
|
esFMIndex = 0 ;
|
||||||
{
|
{
|
||||||
const devMerge *p;
|
const devMerge *p;
|
||||||
|
|
||||||
for ( p = devMergeList ; p != NULL ; p=p->next ) freeMagic((char *)p);
|
free_magic1_t mm1 = freeMagic1_init();
|
||||||
|
for (p = devMergeList; p != NULL; p = p->next)
|
||||||
|
freeMagic1(&mm1, (char *)p);
|
||||||
|
freeMagic1_end(&mm1);
|
||||||
}
|
}
|
||||||
} else if ( esDistrJunct )
|
} else if ( esDistrJunct )
|
||||||
EFVisitDevs(devDistJunctVisit, (ClientData) NULL);
|
EFVisitDevs(devDistJunctVisit, (ClientData) NULL);
|
||||||
|
|
|
||||||
|
|
@ -95,6 +95,7 @@ extOutputGeneratedLabels(parentUse, f)
|
||||||
|
|
||||||
parentDef = parentUse->cu_def;
|
parentDef = parentUse->cu_def;
|
||||||
|
|
||||||
|
free_magic1_t mm1 = freeMagic1_init();
|
||||||
while ((lab = parentDef->cd_labels) != NULL)
|
while ((lab = parentDef->cd_labels) != NULL)
|
||||||
{
|
{
|
||||||
if ((lab->lab_flags & LABEL_GENERATE) == 0) return;
|
if ((lab->lab_flags & LABEL_GENERATE) == 0) return;
|
||||||
|
|
@ -106,9 +107,10 @@ extOutputGeneratedLabels(parentUse, f)
|
||||||
for (n = 0; n < ExtCurStyle->exts_numResistClasses; n++)
|
for (n = 0; n < ExtCurStyle->exts_numResistClasses; n++)
|
||||||
fprintf(f, " 0 0");
|
fprintf(f, " 0 0");
|
||||||
putc('\n', f);
|
putc('\n', f);
|
||||||
freeMagic(lab);
|
freeMagic1(&mm1, lab);
|
||||||
parentDef->cd_labels = lab->lab_next;
|
parentDef->cd_labels = lab->lab_next;
|
||||||
}
|
}
|
||||||
|
freeMagic1_end(&mm1);
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
||||||
|
|
@ -2776,8 +2776,12 @@ extOutputDevices(def, transList, outFile)
|
||||||
/* Free the lists */
|
/* Free the lists */
|
||||||
|
|
||||||
for (i = 0; i < n; i++)
|
for (i = 0; i < n; i++)
|
||||||
|
{
|
||||||
|
free_magic1_t mm1 = freeMagic1_init();
|
||||||
for (lb = extSpecialBounds[i]; lb != NULL; lb = lb->b_next)
|
for (lb = extSpecialBounds[i]; lb != NULL; lb = lb->b_next)
|
||||||
freeMagic((char *)lb);
|
freeMagic1(&mm1, (char *)lb);
|
||||||
|
freeMagic1_end(&mm1);
|
||||||
|
}
|
||||||
freeMagic((char *)extSpecialBounds);
|
freeMagic((char *)extSpecialBounds);
|
||||||
|
|
||||||
/* Put the region list back the way we found it: */
|
/* Put the region list back the way we found it: */
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue