qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH v1] machine: properly free device_memory
@ 2018-07-02  9:41 David Hildenbrand
  2018-07-02 10:32 ` Igor Mammedov
  2018-07-02 21:43 ` Eduardo Habkost
  0 siblings, 2 replies; 3+ messages in thread
From: David Hildenbrand @ 2018-07-02  9:41 UTC (permalink / raw)
  To: qemu-devel
  Cc: Eduardo Habkost, Igor Mammedov, Marcel Apfelbaum,
	David Hildenbrand

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

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [Qemu-devel] [PATCH v1] machine: properly free device_memory
  2018-07-02  9:41 [Qemu-devel] [PATCH v1] machine: properly free device_memory David Hildenbrand
@ 2018-07-02 10:32 ` Igor Mammedov
  2018-07-02 21:43 ` Eduardo Habkost
  1 sibling, 0 replies; 3+ messages in thread
From: Igor Mammedov @ 2018-07-02 10:32 UTC (permalink / raw)
  To: David Hildenbrand; +Cc: qemu-devel, Eduardo Habkost, Marcel Apfelbaum

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>

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [Qemu-devel] [PATCH v1] machine: properly free device_memory
  2018-07-02  9:41 [Qemu-devel] [PATCH v1] machine: properly free device_memory David Hildenbrand
  2018-07-02 10:32 ` Igor Mammedov
@ 2018-07-02 21:43 ` Eduardo Habkost
  1 sibling, 0 replies; 3+ messages in thread
From: Eduardo Habkost @ 2018-07-02 21:43 UTC (permalink / raw)
  To: David Hildenbrand; +Cc: qemu-devel, Igor Mammedov, Marcel Apfelbaum

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

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2018-07-02 21:43 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-07-02  9:41 [Qemu-devel] [PATCH v1] machine: properly free device_memory David Hildenbrand
2018-07-02 10:32 ` Igor Mammedov
2018-07-02 21:43 ` Eduardo Habkost

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).