[PATCHv3 09/14] Xi: fix memory leak in ProcXGetSelectedExtensionEvents
Peter Hutterer
peter.hutterer at who-t.net
Sun Apr 3 16:00:17 PDT 2011
On Tue, Mar 29, 2011 at 06:08:15PM +0300, Tiago Vignatti wrote:
> Signed-off-by: Tiago Vignatti <tiago.vignatti at nokia.com>
> ---
> Xi/getselev.c | 2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
>
> 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;
> }
>
don't see why this would be a leak, given that it only allocates a buffer
for a nonzero length. either way, doesn't hurt, so
Reviewed-by: Peter Hutterer <peter.hutterer at who-t.net>
Cheers,
Peter
More information about the xorg-devel
mailing list