mirror of
https://github.com/RTimothyEdwards/magic.git
synced 2026-08-22 14:17:43 +02:00
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:
committed by
R. Timothy Edwards
parent
5e8a3f038a
commit
3b4d66e7d7
+3
-1
@@ -95,6 +95,7 @@ extOutputGeneratedLabels(parentUse, f)
|
||||
|
||||
parentDef = parentUse->cu_def;
|
||||
|
||||
free_magic1_t mm1 = freeMagic1_init();
|
||||
while ((lab = parentDef->cd_labels) != NULL)
|
||||
{
|
||||
if ((lab->lab_flags & LABEL_GENERATE) == 0) return;
|
||||
@@ -106,9 +107,10 @@ extOutputGeneratedLabels(parentUse, f)
|
||||
for (n = 0; n < ExtCurStyle->exts_numResistClasses; n++)
|
||||
fprintf(f, " 0 0");
|
||||
putc('\n', f);
|
||||
freeMagic(lab);
|
||||
freeMagic1(&mm1, lab);
|
||||
parentDef->cd_labels = lab->lab_next;
|
||||
}
|
||||
freeMagic1_end(&mm1);
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
+5
-1
@@ -2776,8 +2776,12 @@ extOutputDevices(def, transList, outFile)
|
||||
/* Free the lists */
|
||||
|
||||
for (i = 0; i < n; i++)
|
||||
{
|
||||
free_magic1_t mm1 = freeMagic1_init();
|
||||
for (lb = extSpecialBounds[i]; lb != NULL; lb = lb->b_next)
|
||||
freeMagic((char *)lb);
|
||||
freeMagic1(&mm1, (char *)lb);
|
||||
freeMagic1_end(&mm1);
|
||||
}
|
||||
freeMagic((char *)extSpecialBounds);
|
||||
|
||||
/* Put the region list back the way we found it: */
|
||||
|
||||
Reference in New Issue
Block a user