qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Olivia Yin <hong-hua.yin@freescale.com>
To: qemu-devel@nongnu.org, qemu-ppc@nongnu.org
Cc: Olivia Yin <hong-hua.yin@freescale.com>
Subject: [Qemu-devel] [RFC PATCH v6 4/4] free rom->data when rom_reset
Date: Tue, 27 Nov 2012 15:07:39 +0800	[thread overview]
Message-ID: <1354000059-805-5-git-send-email-hong-hua.yin@freescale.com> (raw)
In-Reply-To: <1354000059-805-4-git-send-email-hong-hua.yin@freescale.com>

Signed-off-by: Olivia Yin <hong-hua.yin@freescale.com>
---
 hw/loader.c |    7 ++-----
 1 files changed, 2 insertions(+), 5 deletions(-)

diff --git a/hw/loader.c b/hw/loader.c
index d075ed3..2dde6ba 100644
--- a/hw/loader.c
+++ b/hw/loader.c
@@ -752,11 +752,8 @@ static void rom_reset(void *unused)
             continue;
         }
         cpu_physical_memory_write_rom(rom->addr, rom->data, rom->romsize);
-        if (rom->isrom) {
-            /* rom needs to be written only once */
-            g_free(rom->data);
-            rom->data = NULL;
-        }
+        g_free(rom->data);
+        rom->data = NULL;
     }
 }
 
-- 
1.7.1

      reply	other threads:[~2012-11-27  7:56 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-11-27  7:07 [Qemu-devel] [RFC PATCH v6 0/4] reload images from host rootfs on reset to save footprint Olivia Yin
2012-11-27  7:07 ` [Qemu-devel] [RFC PATCH v6 1/4] use image_file_reset to reload initrd Olivia Yin
2012-11-27  7:07   ` [Qemu-devel] [RFC PATCH v6 2/4] use uimage_reset to reload uimage Olivia Yin
2012-11-27  7:07     ` [Qemu-devel] [RFC PATCH v6 3/4] use elf_reset to reload elf image Olivia Yin
2012-11-27  7:07       ` Olivia Yin [this message]

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=1354000059-805-5-git-send-email-hong-hua.yin@freescale.com \
    --to=hong-hua.yin@freescale.com \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-ppc@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).