chiark
/
gitweb
/
~mdw
/
checkpath
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
tmpdir.c: Remove mention of unimplemented (and unhelpful) `-t' option.
[checkpath]
/
checkpath.c
diff --git
a/checkpath.c
b/checkpath.c
index 5c047a595ebea34a561cd2359ce8dc4baf87502b..4cf5181ddc1d19ce82cb22151ecf5d857090438e 100644
(file)
--- 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);
struct elt *e = sp->e_link;
d.len = sp->e_offset;
DPUTZ(&d);
- free(sp); sp = e;
+
x
free(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) {
/* --- Strip off simple `.' elements --- */
if (strcmp(ee->e_name, ".") == 0) {
- free(ee);
+
x
free(ee);
ee = e;
continue;
}
ee = e;
continue;
}
@@
-396,7
+396,7
@@
unsigned checkpath(const char *p, const struct checkpath *cp)
else if (strcmp(ee->e_name, "..") == 0) {
pop();
else if (strcmp(ee->e_name, "..") == 0) {
pop();
- free(ee);
+
x
free(ee);
ee = e;
continue;
}
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;
report(cp, CP_ERROR, 0, 0, "junk left over after reaching leaf");
while (ee) {
e = ee->e_link;
- free(ee);
+
x
free(ee);
ee = e;
}
}
ee = e;
}
}