summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJesse Adkins <jesserayadkins@gmail.com>2010-08-04 09:21:31 +0000
committerAdam Jackson <ajax@redhat.com>2010-09-29 14:06:41 -0400
commit223794505e64ab5aa215f4847822d66cd6f3450f (patch)
tree0e68f64a5481b6bec4b89449655957a4cf09cec3
parent6a0b4051972a4fa6f1a3b22ec1ae54bd1849bc9f (diff)
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 18b62e0479f15e965611880ada6e0195367df025)
-rw-r--r--hw/xfree86/parser/scan.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/hw/xfree86/parser/scan.c b/hw/xfree86/parser/scan.c
index 531214350..4163a3a6b 100644
--- a/hw/xfree86/parser/scan.c
+++ b/hw/xfree86/parser/scan.c
@@ -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;
}