Am 10.06.2013 22:40, schrieb Stefan Weil:
> The wrong function was reported by cppcheck.
> 
> Signed-off-by: Stefan Weil <s...@weilnetz.de>

Reviewed-by: Andreas Färber <afaer...@suse.de>

> ---
>  target-sparc/cpu.c |    2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/target-sparc/cpu.c b/target-sparc/cpu.c
> index 290b580..13bb7bb 100644
> --- a/target-sparc/cpu.c
> +++ b/target-sparc/cpu.c
> @@ -614,7 +614,7 @@ static int cpu_sparc_find_by_name(sparc_def_t *cpu_def, 
> const char *cpu_model)
>      return 0;
>  
>   error:
> -    free(s);
> +    g_free(s);
>      return -1;
>  }
>  

So s is for the string, and matches occurrence above, fine.

Andreas

-- 
SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany
GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer; HRB 16746 AG Nürnberg

Reply via email to