Am 28.04.2012 14:20, schrieb Stefan Weil:
> Valgrind reported this memory leak which occured very often.
> 
> Test scenario:
> 
> qemu-system-i386 (no arguments), only BIOS started, terminate with
> monitor command (quit).
> 
> Signed-off-by: Stefan Weil <s...@weilnetz.de>
> ---
>  hw/qdev-properties.c |    1 +
>  1 files changed, 1 insertions(+), 0 deletions(-)
> 
> diff --git a/hw/qdev-properties.c b/hw/qdev-properties.c
> index 98dd06a..c212303 100644
> --- a/hw/qdev-properties.c
> +++ b/hw/qdev-properties.c
> @@ -834,6 +834,7 @@ static void set_pci_devfn(Object *obj, Visitor *v, void 
> *opaque,
>  
>      visit_type_str(v, &str, name, &local_err);
>      if (local_err) {
> +        g_free(local_err);

Please use error_free() instead.

Andreas

>          return set_int32(obj, v, opaque, name, errp);
>      }
>  

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