mirror of
https://gitlab.freedesktop.org/xorg/xserver.git
synced 2025-12-30 15:30:08 +01:00
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
385e366c15
commit
c2f117fc0d
1 changed files with 3 additions and 1 deletions
|
|
@ -1446,8 +1446,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…
Add table
Reference in a new issue