summaryrefslogtreecommitdiff
path: root/xserver/hw/xfree86/common/xf86AutoConfig.c
diff options
context:
space:
mode:
Diffstat (limited to 'xserver/hw/xfree86/common/xf86AutoConfig.c')
-rw-r--r--xserver/hw/xfree86/common/xf86AutoConfig.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/xserver/hw/xfree86/common/xf86AutoConfig.c b/xserver/hw/xfree86/common/xf86AutoConfig.c
index b0e036058..117e5d7ab 100644
--- a/xserver/hw/xfree86/common/xf86AutoConfig.c
+++ b/xserver/hw/xfree86/common/xf86AutoConfig.c
@@ -105,7 +105,7 @@ AppendToList(const char *s, const char ***list, int *lines)
str = xnfstrdup(s);
for (p = strtok(str, "\n"); p; p = strtok(NULL, "\n")) {
(*lines)++;
- *list = xnfrealloc(*list, (*lines + 1) * sizeof(**list));
+ *list = xnfreallocarray(*list, *lines + 1, sizeof(**list));
newstr = xnfalloc(strlen(p) + 2);
strcpy(newstr, p);
strcat(newstr, "\n");