]> Sergey Matveev's repositories - nnn.git/commitdiff
Fix #122
authorArun Prakash Jana <engineerarun@gmail.com>
Sat, 27 Oct 2018 13:43:12 +0000 (19:13 +0530)
committerArun Prakash Jana <engineerarun@gmail.com>
Sat, 27 Oct 2018 13:43:12 +0000 (19:13 +0530)
nnn.c

diff --git a/nnn.c b/nnn.c
index 125998b2ee43d6a9f9e208c3807b9b36d9bbfaf1..0aa375a66d35ef140762fe37d85464ea505d66d7 100644 (file)
--- a/nnn.c
+++ b/nnn.c
@@ -2160,8 +2160,7 @@ static int dentfill(char *path, struct entry **dents,
                        total_dents += ENTRY_INCR;
                        *dents = xrealloc(*dents, total_dents * sizeof(**dents));
                        if (*dents == NULL) {
-                               if (pnamebuf)
-                                       free(pnamebuf);
+                               free(pnamebuf);
                                errexit();
                        }
                        DPRINTF_P(*dents);