qemu-trivial
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-trivial] [Qemu-devel] [PATCH] target-sparc: Replace free by g_


From: Andreas Färber
Subject: Re: [Qemu-trivial] [Qemu-devel] [PATCH] target-sparc: Replace free by g_free
Date: Tue, 11 Jun 2013 14:27:46 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130510 Thunderbird/17.0.6

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

Reviewed-by: Andreas Färber <address@hidden>

> ---
>  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

[Prev in Thread] Current Thread [Next in Thread]