A library can't reasonably assume that `arena_global' is still
`arena_stdlib'. Fortunately, we don't retain allocations across calls,
so we don't have to worry about `arena_global' being changed.
struct elt *e = sp->e_link;
d.len = sp->e_offset;
DPUTZ(&d);
- free(sp); sp = e;
+ xfree(sp); sp = e;
}
}
/* --- Strip off simple `.' elements --- */
if (strcmp(ee->e_name, ".") == 0) {
- free(ee);
+ xfree(ee);
ee = e;
continue;
}
else if (strcmp(ee->e_name, "..") == 0) {
pop();
- free(ee);
+ xfree(ee);
ee = e;
continue;
}
report(cp, CP_ERROR, 0, 0, "junk left over after reaching leaf");
while (ee) {
e = ee->e_link;
- free(ee);
+ xfree(ee);
ee = e;
}
}