[PATCH 10/19] xfree86: plug minor memory leak.

Fernando Carrijo fcarrijo.lists at gmail.com
Tue Sep 7 18:26:57 PDT 2010


Peter Hutterer <peter.hutterer at who-t.net> wrote:

> When no identifier for the device was specified, the allocated IDevRec (and
> its associated fields) need to be freed.
> 
> Signed-off-by: Peter Hutterer <peter.hutterer at who-t.net>

Reviewed-by: Fernando Carrijo <fcarrijo at freedesktop.org>

> ---
>  hw/xfree86/common/xf86Xinput.c |    3 ++-
>  1 files changed, 2 insertions(+), 1 deletions(-)
> 
> diff --git a/hw/xfree86/common/xf86Xinput.c b/hw/xfree86/common/xf86Xinput.c
> index a34ecc1..0aa9c42 100644
> --- a/hw/xfree86/common/xf86Xinput.c
> +++ b/hw/xfree86/common/xf86Xinput.c
> @@ -911,7 +911,8 @@ NewInputDeviceRequest (InputOption *options, InputAttributes *attrs,
>  
>      if (!idev->identifier) {
>          xf86Msg(X_ERROR, "No device identifier specified (ignoring)\n");
> -        return BadMatch;
> +        rval = BadMatch;
> +        goto unwind;
>      }
>  
>      rval = xf86NewInputDevice(idev, pdev,
> -- 
> 1.7.2.2
> 
> _______________________________________________
> xorg-devel at lists.x.org: X.Org development
> Archives: http://lists.x.org/archives/xorg-devel
> Info: http://lists.x.org/mailman/listinfo/xorg-devel


More information about the xorg-devel mailing list