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>
This commit is contained in:
parent
af054db005
commit
719b37c33a
|
@ -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")) {
|
||||
|
|
Loading…
Reference in New Issue
Block a user