Fix memory leak

This commit is contained in:
sin 2016-01-06 15:59:27 +00:00
parent 5fb5e9f82f
commit 6d4166f0d6

View file

@ -485,6 +485,7 @@ dentfill(char *path, struct entry **dents,
r = lstat(newpath, &sb); r = lstat(newpath, &sb);
if (r == -1) if (r == -1)
printerr(1, "lstat"); printerr(1, "lstat");
free(newpath);
(*dents)[n].mode = sb.st_mode; (*dents)[n].mode = sb.st_mode;
(*dents)[n].t = sb.st_mtime; (*dents)[n].t = sb.st_mtime;
n++; n++;