mirror of
https://github.com/jarun/nnn.git
synced 2024-11-28 05:41:31 +00:00
Fix memory leak
This commit is contained in:
parent
5fb5e9f82f
commit
6d4166f0d6
1
noice.c
1
noice.c
|
@ -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++;
|
||||||
|
|
Loading…
Reference in a new issue