aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/nnn.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/nnn.c b/src/nnn.c
index 98069fb..b31418c 100644
--- a/src/nnn.c
+++ b/src/nnn.c
@@ -2918,7 +2918,7 @@ static bool parsekvpair(kv **arr, char **envcpy, const uchar id, ushort *items)
if (!maxitems)
return FALSE;
- *arr = malloc(maxitems * sizeof(kv));
+ *arr = calloc(maxitems, sizeof(kv));
if (!arr) {
xerror();
return FALSE;