Only free history path if it is valid

This commit is contained in:
lostd 2014-10-22 22:32:45 +03:00
parent 8123975406
commit d84c3b1079

View file

@ -604,8 +604,10 @@ begin:
/* Find cur from history */
cur = dentfind(dents, n, path, hpath);
free(hpath);
hpath = NULL;
if (hpath != NULL) {
free(hpath);
hpath = NULL;
}
for (;;) {
int nlines;