[PATCH] xkb: plug a memory leak in XkbCopySrvLedInfo

Daniel Stone daniel at fooishbar.org
Thu Mar 19 16:00:23 PDT 2009


On Thu, Mar 19, 2009 at 09:35:25PM +0100, Maarten Maathuis wrote:
> ---
>  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

How do you figure that? Please file a bug if there's a leak and I'll
check it out later.

Cheers,
Daniel
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: Digital signature
Url : http://lists.x.org/archives/xorg-devel/attachments/20090320/666853c6/attachment.pgp 


More information about the xorg-devel mailing list