]> Sergey Matveev's repositories - nnn.git/commitdiff
Also release filter memory
authorlostd <lostd@2f30.org>
Fri, 10 Oct 2014 07:11:50 +0000 (10:11 +0300)
committerlostd <lostd@2f30.org>
Fri, 10 Oct 2014 07:11:50 +0000 (10:11 +0300)
noice.c

diff --git a/noice.c b/noice.c
index fd10234bc51216dd71694abb8b44b9ea5693c26b..27a4b324bab71f2b2fe9268480ab7c558a11a309 100644 (file)
--- a/noice.c
+++ b/noice.c
@@ -342,7 +342,7 @@ browse(const char *ipath, const char *ifilter)
        struct stat sb;
 
 begin:
-       /* Path should be a malloc(3)-ed string at all times */
+       /* Path and filter should be malloc(3)-ed strings at all times */
        n = 0;
        cur = 0;
        dents = NULL;
@@ -446,6 +446,7 @@ nochange:
                switch (ret) {
                case SEL_QUIT:
                        free(path);
+                       free(filter);
                        return;
                case SEL_BACK:
                        /* Handle root case */