mirror of
https://gitlab.freedesktop.org/xorg/xserver.git
synced 2026-05-01 13:48:02 +02: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>
(cherry picked from commit 18b62e0479)
This commit is contained in:
parent
6a0b405197
commit
223794505e
1 changed files with 2 additions and 0 deletions
|
|
@ -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…
Add table
Reference in a new issue