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>
This commit is contained in:
Jesse Adkins 2010-08-04 09:21:31 +00:00 committed by Matt Turner
parent 4f04fd595e
commit 18b62e0479

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