mirror of
https://github.com/X11Libre/xserver.git
synced 2026-04-14 17:18:09 +00:00
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:
committed by
Matt Turner
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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user