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:
parent
4f04fd595e
commit
18b62e0479
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user