On Sun, Jul 17, 2011 at 10:17 PM, Peter Hutterer
<[email protected]>wrote:

> If priv is NULL the DBG macro would dereference it. priv may be null if
> wcmAllocate() fails or the event device cannot be found..
>
> Signed-off-by: Peter Hutterer <[email protected]>
>

Reviewed-by: Ping Cheng <[email protected]>

Ping

> ---
>  src/wcmConfig.c |    4 ++++
>  1 files changed, 4 insertions(+), 0 deletions(-)
>
> diff --git a/src/wcmConfig.c b/src/wcmConfig.c
> index a799159..6721b14 100644
> --- a/src/wcmConfig.c
> +++ b/src/wcmConfig.c
> @@ -225,6 +225,9 @@ static void wcmUninit(InputDriverPtr drv, InputInfoPtr
> pInfo, int flags)
>        WacomDevicePtr *prev;
>        WacomCommonPtr common = priv->common;
>
> +       if (!priv)
> +               goto out;
> +
>        DBG(1, priv, "\n");
>
>        /* Server 1.10 will UnInit all devices for us */
> @@ -284,6 +287,7 @@ static void wcmUninit(InputDriverPtr drv, InputInfoPtr
> pInfo, int flags)
>                dev = dev->next;
>        }
>
> +out:
>        wcmFree(pInfo);
>        xf86DeleteInput(pInfo, 0);
>  }
> --
> 1.7.6
>
>
>
> ------------------------------------------------------------------------------
> AppSumo Presents a FREE Video for the SourceForge Community by Eric
> Ries, the creator of the Lean Startup Methodology on "Lean Startup
> Secrets Revealed." This video shows you how to validate your ideas,
> optimize your ideas and identify your business strategy.
> http://p.sf.net/sfu/appsumosfdev2dev
> _______________________________________________
> Linuxwacom-devel mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/linuxwacom-devel
>
------------------------------------------------------------------------------
AppSumo Presents a FREE Video for the SourceForge Community by Eric 
Ries, the creator of the Lean Startup Methodology on "Lean Startup 
Secrets Revealed." This video shows you how to validate your ideas, 
optimize your ideas and identify your business strategy.
http://p.sf.net/sfu/appsumosfdev2dev
_______________________________________________
Linuxwacom-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/linuxwacom-devel

Reply via email to