[PATCH 2/5] libXi: Fix memory leak in XIGetSelectedEvents
Julien Cristau
jcristau at debian.org
Thu Jun 17 08:54:34 PDT 2010
On Mon, Jun 14, 2010 at 11:47:32 +0300, Pauli Nieminen wrote:
> mask_in was leaking for every successfull XIGetSelectedEvents.
>
> Signed-off-by: Pauli Nieminen <ext-pauli.nieminen at nokia.com>
> ---
> src/XISelEv.c | 2 ++
> 1 files changed, 2 insertions(+), 0 deletions(-)
>
> diff --git a/src/XISelEv.c b/src/XISelEv.c
> index bdc4fd1..3c1f018 100644
> --- a/src/XISelEv.c
> +++ b/src/XISelEv.c
> @@ -161,6 +161,8 @@ XIGetSelectedEvents(Display* dpy, Window win, int *num_masks_return)
>
> *num_masks_return = reply.num_masks;
>
> + Xfree(mask_in);
> +
> return mask_out;
>
> error:
Reviewed-by: Julien Cristau <jcristau at debian.org>
Looks like this function also doesn't UnlockDisplay() on various paths?
Cheers,
Julien
More information about the xorg-devel
mailing list