xkb: plug a memory leak in XkbCopySrvLedInfo (#20756)

X.Org Bug 20756 <http://bugs.freedesktop.org/show_bug.cgi?id=20756>

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
This commit is contained in:
Maarten Maathuis 2009-03-19 21:35:25 +01:00 committed by Peter Hutterer
parent e26f79335b
commit d698e62690

View File

@ -643,7 +643,7 @@ XkbCopySrvLedInfo( DeviceIntPtr from,
else
sli_new->fb.lf = lf;
if (sli_new->flags & XkbSLI_IsDefault) {
if (!(sli_new->flags & XkbSLI_IsDefault)) {
sli_new->names= _XkbTypedCalloc(XkbNumIndicators,Atom);
sli_new->maps= _XkbTypedCalloc(XkbNumIndicators,XkbIndicatorMapRec);
} /* else sli_new->names/maps is pointing to