qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Eduardo Habkost <ehabkost@redhat.com>
To: Peter Maydell <peter.maydell@linaro.org>, qemu-devel@nongnu.org
Cc: Marcel Apfelbaum <marcel.apfelbaum@gmail.com>,
	Eduardo Habkost <ehabkost@redhat.com>,
	Igor Mammedov <imammedo@redhat.com>,
	"Michael S. Tsirkin" <mst@redhat.com>,
	David Hildenbrand <david@redhat.com>
Subject: [Qemu-devel] [PULL 1/2] machine: properly free device_memory
Date: Mon,  9 Jul 2018 14:41:53 -0300	[thread overview]
Message-ID: <20180709174154.9470-2-ehabkost@redhat.com> (raw)
In-Reply-To: <20180709174154.9470-1-ehabkost@redhat.com>

From: David Hildenbrand <david@redhat.com>

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>
Message-Id: <20180702094152.7882-1-david@redhat.com>
Reviewed-by: Igor Mammedov <imammedo@redhat.com>
Signed-off-by: Eduardo Habkost <ehabkost@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 2077328bcc..3fad6f8801 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.18.0.rc1.1.g3f1ff2140

  reply	other threads:[~2018-07-09 17:42 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-07-09 17:41 [Qemu-devel] [PULL 0/2] Machine/NUMA fixes for -rc0 Eduardo Habkost
2018-07-09 17:41 ` Eduardo Habkost [this message]
2018-07-09 17:41 ` [Qemu-devel] [PULL 2/2] hw/machine: Remove the Zero check of nb_numa_nodes for numa_complete_configuration() Eduardo Habkost
2018-07-09 17:48 ` [Qemu-devel] [PULL 0/2] Machine/NUMA fixes for -rc0 no-reply
2018-07-09 21:43 ` Peter Maydell

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180709174154.9470-2-ehabkost@redhat.com \
    --to=ehabkost@redhat.com \
    --cc=david@redhat.com \
    --cc=imammedo@redhat.com \
    --cc=marcel.apfelbaum@gmail.com \
    --cc=mst@redhat.com \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).