xfree86: Fix leaks in OpenConfigFile and OpenConfigDir

[mattst88: fixed whitespace and a missing semicolon]

Signed-off-by: Jesse Adkins <jesserayadkins@gmail.com>
Signed-off-by: Matt Turner <mattst88@gmail.com>
(cherry picked from commit 18b62e0479)
This commit is contained in:
Jesse Adkins 2010-08-04 09:21:31 +00:00 committed by Adam Jackson
parent 6a0b405197
commit 223794505e

View file

@ -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;
}