aboutsummaryrefslogtreecommitdiff
path: root/xorg-server/hw/xfree86/parser
diff options
context:
space:
mode:
Diffstat (limited to 'xorg-server/hw/xfree86/parser')
-rw-r--r--xorg-server/hw/xfree86/parser/scan.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/xorg-server/hw/xfree86/parser/scan.c b/xorg-server/hw/xfree86/parser/scan.c
index 9099227bb..156bc299a 100644
--- a/xorg-server/hw/xfree86/parser/scan.c
+++ b/xorg-server/hw/xfree86/parser/scan.c
@@ -852,6 +852,10 @@ OpenConfigDir(const char *path, const char *cmdline, const char *projroot,
/* match files named *.conf */
num = scandir(dirpath, &list, ConfigFilter, alphasort);
+ if (num < 0) {
+ list = NULL;
+ num = 0;
+ }
found = AddConfigDirFiles(dirpath, list, num);
if (!found) {
free(dirpath);