aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/nnn.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/nnn.c b/src/nnn.c
index edcf3de..013e48b 100644
--- a/src/nnn.c
+++ b/src/nnn.c
@@ -4367,6 +4367,8 @@ static int dentfill(char *path, struct entry **dents)
num_files = 0;
dir_blocks = 0;
buf = (char *)alloca(strlen(path) + NAME_MAX + 2);
+ if (!buf)
+ return 0;
if (fstatat(fd, path, &sb_path, 0) == -1)
goto exit;