qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH] nvdimm: fix memory leak in error code path


From: Stefan Hajnoczi
Subject: Re: [Qemu-devel] [PATCH] nvdimm: fix memory leak in error code path
Date: Wed, 6 Jul 2016 16:52:11 +0100
User-agent: Mutt/1.6.1 (2016-04-27)

On Tue, Jun 28, 2016 at 10:06:46AM +0100, Stefan Hajnoczi wrote:
> object_get_canonical_path_component() returns a heap-allocated string
> that must be freed using g_free().
> 
> Reported-by: Paolo Bonzini <address@hidden>
> Signed-off-by: Stefan Hajnoczi <address@hidden>
> ---
>  hw/mem/nvdimm.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/hw/mem/nvdimm.c b/hw/mem/nvdimm.c
> index 81896c0..7895805 100644
> --- a/hw/mem/nvdimm.c
> +++ b/hw/mem/nvdimm.c
> @@ -98,6 +98,7 @@ static void nvdimm_realize(PCDIMMDevice *dimm, Error **errp)
>                     "small to contain nvdimm label (0x%" PRIx64 ") and "
>                     "aligned PMEM (0x%" PRIx64 ")",
>                     path, memory_region_size(mr), nvdimm->label_size, align);
> +        g_free(path);
>          return;
>      }

Michael: Please take this patch through your ACPI tree

Thanks,
Stefan

Attachment: signature.asc
Description: PGP signature


reply via email to

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