diff options
author | Tiago Vignatti <tiago.vignatti@nokia.com> | 2011-03-29 20:04:24 +0300 |
---|---|---|
committer | Tiago Vignatti <tiago.vignatti@nokia.com> | 2011-04-04 15:41:14 +0300 |
commit | 719b37c33a89d6ad86c79097e5c67b9b3cea5aac (patch) | |
tree | 6d4d81bb0eb846a182d4d24048a862a18f94aa23 | |
parent | af054db005b48160b117dfd5bec5f821ee614ea9 (diff) |
xfree86: fix memory leak in xf86LoadModules
Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com>
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Reviewed-by: Nicolas Peninguy <nico@lostgeeks.org>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
-rw-r--r-- | 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 e664ce451..0b36163c0 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")) { |