X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~mdw/git/checkpath/blobdiff_plain/6da5efa9bed47c5fe8170bf401d44801c26a51d0..056e5530ccbb4f63a226363ec065362de9e51213:/checkpath.c diff --git a/checkpath.c b/checkpath.c index 5c047a5..4cf5181 100644 --- a/checkpath.c +++ b/checkpath.c @@ -139,7 +139,7 @@ static void pop(void) struct elt *e = sp->e_link; d.len = sp->e_offset; DPUTZ(&d); - free(sp); sp = e; + xfree(sp); sp = e; } } @@ -387,7 +387,7 @@ unsigned checkpath(const char *p, const struct checkpath *cp) /* --- Strip off simple `.' elements --- */ if (strcmp(ee->e_name, ".") == 0) { - free(ee); + xfree(ee); ee = e; continue; } @@ -396,7 +396,7 @@ unsigned checkpath(const char *p, const struct checkpath *cp) else if (strcmp(ee->e_name, "..") == 0) { pop(); - free(ee); + xfree(ee); ee = e; continue; } @@ -480,7 +480,7 @@ unsigned checkpath(const char *p, const struct checkpath *cp) report(cp, CP_ERROR, 0, 0, "junk left over after reaching leaf"); while (ee) { e = ee->e_link; - free(ee); + xfree(ee); ee = e; } }