summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--coreutils/diff.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/coreutils/diff.c b/coreutils/diff.c
index 1903bb1..7555718 100644
--- a/coreutils/diff.c
+++ b/coreutils/diff.c
@@ -1070,7 +1070,7 @@ static int add_to_dirlist(const char *filename,
static char **get_dir(char *path)
{
dl_count = 0;
- dl = NULL;
+ dl = xzalloc(sizeof(dl[0]));
/* If -r has been set, then the recursive_action function will be
* used. Unfortunately, this outputs the root directory along with