[PATCHv3 14/14] xfree86: fix memory leak in xf86LoadModules
Tiago Vignatti
tiago.vignatti at nokia.com
Tue Mar 29 08:08:20 PDT 2011
Signed-off-by: Tiago Vignatti <tiago.vignatti at nokia.com>
---
Alan, I guess you can S-o-b this one?
hw/xfree86/common/xf86Init.c | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
diff --git a/hw/xfree86/common/xf86Init.c b/hw/xfree86/common/xf86Init.c
index e664ce4..0b36163 100644
--- a/hw/xfree86/common/xf86Init.c
+++ b/hw/xfree86/common/xf86Init.c
@@ -1414,8 +1414,10 @@ xf86LoadModules(char **list, pointer *optlist)
name = xf86NormalizeName(list[i]);
/* Skip empty names */
- if (name == NULL || *name == '\0')
+ if (name == NULL || *name == '\0') {
+ free(name);
continue;
+ }
/* Replace obsolete keyboard driver with kbd */
if (!xf86NameCmp(name, "keyboard")) {
--
1.7.0.4
More information about the xorg-devel
mailing list