diff options
Diffstat (limited to 'xorg-server/hw/xfree86/parser/scan.c')
-rw-r--r-- | xorg-server/hw/xfree86/parser/scan.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/xorg-server/hw/xfree86/parser/scan.c b/xorg-server/hw/xfree86/parser/scan.c index 99e1288a5..783a42545 100644 --- a/xorg-server/hw/xfree86/parser/scan.c +++ b/xorg-server/hw/xfree86/parser/scan.c @@ -819,6 +819,7 @@ OpenConfigFile(const char *path, const char *cmdline, const char *projroot, }
}
+ free(pathcopy);
if (file) {
configFiles[numFiles].file = file;
configFiles[numFiles].path = strdup(filepath);
@@ -927,6 +928,7 @@ OpenConfigDir(const char *path, const char *cmdline, const char *projroot, }
}
+ free(pathcopy);
return dirpath;
}
@@ -1088,8 +1090,7 @@ void xf86setSection (char *section)
{
free(configSection);
- configSection = malloc(strlen (section) + 1);
- strcpy (configSection, section);
+ configSection = strdup(section);
}
/*
|