From 18b62e0479f15e965611880ada6e0195367df025 Mon Sep 17 00:00:00 2001 From: Jesse Adkins Date: Wed, 4 Aug 2010 09:21:31 +0000 Subject: [PATCH] xfree86: Fix leaks in OpenConfigFile and OpenConfigDir [mattst88: fixed whitespace and a missing semicolon] Signed-off-by: Jesse Adkins Signed-off-by: Matt Turner --- hw/xfree86/parser/scan.c | 2 ++ 1 file changed, 2 insertions(+) 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; }