]> Sergey Matveev's repositories - nnn.git/commitdiff
Fix memory leak
authorsin <sin@2f30.org>
Wed, 6 Jan 2016 15:59:27 +0000 (15:59 +0000)
committersin <sin@2f30.org>
Wed, 6 Jan 2016 15:59:27 +0000 (15:59 +0000)
noice.c

diff --git a/noice.c b/noice.c
index d1b2c9193f4d7c41835d4bd03f9dcce98ce097c9..b03213557c498d637906a8dcf4065938bf3af8eb 100644 (file)
--- a/noice.c
+++ b/noice.c
@@ -485,6 +485,7 @@ dentfill(char *path, struct entry **dents,
                r = lstat(newpath, &sb);
                if (r == -1)
                        printerr(1, "lstat");
+               free(newpath);
                (*dents)[n].mode = sb.st_mode;
                (*dents)[n].t = sb.st_mtime;
                n++;