From 3dbe08aad6f68cc2aa09bdd227b4cf01c5688cc0 Mon Sep 17 00:00:00 2001 From: Arun Prakash Jana Date: Fri, 6 Mar 2020 18:58:08 +0530 Subject: [PATCH] Fix #486 --- src/nnn.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/nnn.c b/src/nnn.c index 2ca5ee57..9633c46f 100644 --- a/src/nnn.c +++ b/src/nnn.c @@ -6489,7 +6489,7 @@ static bool setup_config(void) if (!xdg) len = strlen(home) + 1 + 21; /* add length of "/.config/nnn/sessions" */ - cfgdir = (char *)malloc(len - 8); /* Subtract length of sessions */ + cfgdir = (char *)malloc(len); plugindir = (char *)malloc(len); sessiondir = (char *)malloc(len); if (!cfgdir || !plugindir || !sessiondir) {