[PATCH] xkb: plug a memory leak in XkbCopySrvLedInfo

Maarten Maathuis madman2003 at gmail.com
Thu Mar 19 13:35:25 PDT 2009


---
 xkb/xkbLEDs.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/xkb/xkbLEDs.c b/xkb/xkbLEDs.c
index c61296b..a70ac84 100644
--- a/xkb/xkbLEDs.c
+++ b/xkb/xkbLEDs.c
@@ -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
-- 
1.6.2



More information about the xorg-devel mailing list