qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Stefano Dong (董兴水)" <opensource.dxs@aliyun.com>
To: qemu-devel@nongnu.org
Cc: zhugh.fnst@cn.fujitsu.com, mst@redhat.com, armbru@redhat.com,
	agraf@suse.de, opensource.dxs@aliyun.com,
	zhongguocheng@huawei.com
Subject: [Qemu-devel]  [PATCH] Fix memory leak on error
Date: Thu, 26 Nov 2015 12:00:12 +0000	[thread overview]
Message-ID: <1448539212-7080-1-git-send-email-opensource.dxs@aliyun.com> (raw)

hw/ppc/spapr.c: Fix memory leak on error, it was introduced in bc09e0611
hw/acpi/memory_hotplug.c: Fix memory leak on error, it was introduced in 34f2af3d

Signed-off-by: Stefano Dong (董兴水) <opensource.dxs@aliyun.com>
---
 hw/acpi/memory_hotplug.c | 1 +
 hw/ppc/spapr.c           | 1 +
 2 files changed, 2 insertions(+)

diff --git a/hw/acpi/memory_hotplug.c b/hw/acpi/memory_hotplug.c
index ce428df..e4b9a01 100644
--- a/hw/acpi/memory_hotplug.c
+++ b/hw/acpi/memory_hotplug.c
@@ -155,6 +155,7 @@ static void acpi_memory_hotplug_write(void *opaque, hwaddr addr, uint64_t data,
                 qapi_event_send_mem_unplug_error(dev->id,
                                                  error_get_pretty(local_err),
                                                  &error_abort);
+                error_free(local_err);
                 break;
             }
             trace_mhp_acpi_pc_dimm_deleted(mem_st->selector);
diff --git a/hw/ppc/spapr.c b/hw/ppc/spapr.c
index 030ee35..3bb8bcd 100644
--- a/hw/ppc/spapr.c
+++ b/hw/ppc/spapr.c
@@ -125,6 +125,7 @@ static XICSState *xics_system_init(MachineState *machine,
             error_report("kernel_irqchip requested but unavailable: %s",
                          error_get_pretty(err));
         }
+        error_free(err);
     }
 
     if (!icp) {
-- 
2.5.1.windows.1

             reply	other threads:[~2015-11-26 12:02 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-11-26 12:00 Stefano Dong (董兴水) [this message]
2015-11-26 12:33 ` [Qemu-devel] [PATCH] Fix memory leak on error Markus Armbruster
2015-11-27  6:31   ` Stefano Dong
2015-11-27 10:02     ` Markus Armbruster
2015-11-26 14:17 ` Igor Mammedov

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=1448539212-7080-1-git-send-email-opensource.dxs@aliyun.com \
    --to=opensource.dxs@aliyun.com \
    --cc=agraf@suse.de \
    --cc=armbru@redhat.com \
    --cc=mst@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=zhongguocheng@huawei.com \
    --cc=zhugh.fnst@cn.fujitsu.com \
    /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).