On Wed, Jun 27, 2018 at 02:24:41PM -0700, Jason Gerecke wrote:
> There is no need to free the 'tool' variable, since the "error" label is
> only ever reached if 'tool' is already null.
> 
> V575 The null pointer is passed into 'free' function. Inspect the first 
> argument.
> 
> Signed-off-by: Jason Gerecke <jason.gere...@wacom.com>

strange warning because IMO this is still good practise. The whole point of
a unified error path is to not have to worry about what has been initialized
and whatnot.

but Reviewed-by: Peter Hutterer <peter.hutte...@who-t.net> anyway.

Cheers,
   Peter

> ---
>  src/wcmConfig.c | 1 -
>  1 file changed, 1 deletion(-)
> 
> diff --git a/src/wcmConfig.c b/src/wcmConfig.c
> index f85f1ca..69310e9 100644
> --- a/src/wcmConfig.c
> +++ b/src/wcmConfig.c
> @@ -106,7 +106,6 @@ static int wcmAllocate(InputInfoPtr pInfo)
>       return 1;
>  
>  error:
> -     free(tool);
>       wcmFreeCommon(&common);
>       free(priv);
>       return 0;
> -- 
> 2.18.0
> 
> 
> ------------------------------------------------------------------------------
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, Slashdot.org! http://sdm.link/slashdot
> _______________________________________________
> Linuxwacom-devel mailing list
> Linuxwacom-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/linuxwacom-devel
> 

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Linuxwacom-devel mailing list
Linuxwacom-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linuxwacom-devel

Reply via email to