aboutsummaryrefslogtreecommitdiff
path: root/show-files.c
diff options
context:
space:
mode:
Diffstat (limited to 'show-files.c')
-rw-r--r--show-files.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/show-files.c b/show-files.c
index b53ab1053..afeb63567 100644
--- a/show-files.c
+++ b/show-files.c
@@ -30,9 +30,9 @@ static void add_name(const char *pathname, int len)
if (nr_dir == dir_alloc) {
dir_alloc = alloc_nr(dir_alloc);
- dir = realloc(dir, dir_alloc*sizeof(char *));
+ dir = xrealloc(dir, dir_alloc*sizeof(char *));
}
- name = malloc(len + 1);
+ name = xmalloc(len + 1);
memcpy(name, pathname, len + 1);
dir[nr_dir++] = name;
}