[PATCH] dix: plug memory leak in freeing TouchClass
Alan Coopersmith
alan.coopersmith at oracle.com
Mon Apr 22 23:11:54 PDT 2013
On 04/22/13 11:04 PM, Peter Hutterer wrote:
> ==15562== 1,800 bytes in 1 blocks are definitely lost in loss record 298 of 330
> ==15562== at 0x4A06B6F: calloc (vg_replace_malloc.c:593)
> ==15562== by 0x4312C7: InitTouchClassDeviceStruct (devices.c:1644)
>
> Signed-off-by: Peter Hutterer <peter.hutterer at who-t.net>
> ---
> dix/devices.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/dix/devices.c b/dix/devices.c
> index be236dd..85961a0 100644
> --- a/dix/devices.c
> +++ b/dix/devices.c
> @@ -795,6 +795,7 @@ FreeDeviceClass(int type, pointer *class)
> free((*t)->touches[i].valuators);
> }
>
> + free((*t)->touches);
> free((*t));
> break;
> }
>
Reviewed-by: Alan Coopersmith <alan.coopersmith at oracle.com>
--
-Alan Coopersmith- alan.coopersmith at oracle.com
Oracle Solaris Engineering - http://blogs.oracle.com/alanc
More information about the xorg-devel
mailing list