[Qemu-devel] [PATCH v1] machine: properly free device_memory

David Hildenbrand posted 1 patch 7 years, 4 months ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20180702094152.7882-1-david@redhat.com
Test checkpatch passed
Test docker-mingw@fedora passed
Test docker-quick@centos7 passed
Test s390x failed
hw/core/machine.c | 1 +
1 file changed, 1 insertion(+)
[Qemu-devel] [PATCH v1] machine: properly free device_memory
Posted by David Hildenbrand 7 years, 4 months ago
Machines might have inititalized device_memory if they support memory
devices, so let's properly free it.

Signed-off-by: David Hildenbrand <david@redhat.com>
---
 hw/core/machine.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/hw/core/machine.c b/hw/core/machine.c
index 617e5f8d75..ae3e713e90 100644
--- a/hw/core/machine.c
+++ b/hw/core/machine.c
@@ -674,6 +674,7 @@ static void machine_finalize(Object *obj)
     g_free(ms->dumpdtb);
     g_free(ms->dt_compatible);
     g_free(ms->firmware);
+    g_free(ms->device_memory);
 }
 
 bool machine_usb(MachineState *machine)
-- 
2.17.1


Re: [Qemu-devel] [PATCH v1] machine: properly free device_memory
Posted by Igor Mammedov 7 years, 4 months ago
On Mon,  2 Jul 2018 11:41:52 +0200
David Hildenbrand <david@redhat.com> wrote:

> Machines might have inititalized device_memory if they support memory
> devices, so let's properly free it.
> 
> Signed-off-by: David Hildenbrand <david@redhat.com>
> ---
>  hw/core/machine.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/hw/core/machine.c b/hw/core/machine.c
> index 617e5f8d75..ae3e713e90 100644
> --- a/hw/core/machine.c
> +++ b/hw/core/machine.c
> @@ -674,6 +674,7 @@ static void machine_finalize(Object *obj)
>      g_free(ms->dumpdtb);
>      g_free(ms->dt_compatible);
>      g_free(ms->firmware);
> +    g_free(ms->device_memory);
>  }
>  
>  bool machine_usb(MachineState *machine)

Reviewed-by: Igor Mammedov <imammedo@redhat.com>

Re: [Qemu-devel] [PATCH v1] machine: properly free device_memory
Posted by Eduardo Habkost 7 years, 4 months ago
On Mon, Jul 02, 2018 at 11:41:52AM +0200, David Hildenbrand wrote:
> Machines might have inititalized device_memory if they support memory
> devices, so let's properly free it.
> 
> Signed-off-by: David Hildenbrand <david@redhat.com>

Queued, thanks.

-- 
Eduardo