[PATCH 07/11] Xi: fix memory leak in ProcXGetSelectedExtensionEvents

Nicolas PENINGUY nico at lostgeeks.org
Fri Mar 25 17:12:12 PDT 2011


On Fri, 2011-03-25 at 20:41 +0200, Tiago Vignatti wrote:
> diff --git a/Xi/getselev.c b/Xi/getselev.c
> index 09a53f4..7304738 100644
> --- a/Xi/getselev.c
> +++ b/Xi/getselev.c
> @@ -152,8 +152,8 @@ ProcXGetSelectedExtensionEvents(ClientPtr client)
>      if (total_length) {
>  	client->pSwapReplyFunc = (ReplySwapPtr) Swap32Write;
>  	WriteSwappedDataToClient(client, total_length, buf);
> -	free(buf);
>      }
> +    free(buf);
>      return Success;
>  }

I think this one isn't necessary, as it only change behaviour when doing
malloc(0)...

For the rest of the serie, when I didn't comment :

Reviewed-by: Nicolas Peninguy <nico at lostgeeks.org>




More information about the xorg-devel mailing list