[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 09/28] spapr: Plug minor memory leak in spapr_machine_init()
From: |
Markus Armbruster |
Subject: |
[PULL 09/28] spapr: Plug minor memory leak in spapr_machine_init() |
Date: |
Thu, 2 Jul 2020 13:09:12 +0200 |
spapr_machine_init() leaks an Error object when
kvmppc_check_papr_resize_hpt() fails and spapr->resize_hpt is
SPAPR_RESIZE_HPT_DISABLED, i.e. when the host doesn't support hash
page table resizing, and the user didn't ask for it. As harmless as
memory leaks can possibly be. Plug it.
Fixes: 30f4b05bd090564181554d0890605eb2c143e4ea
Cc: David Gibson <dgibson@redhat.com>
Cc: qemu-ppc@nongnu.org
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Reviewed-by: Greg Kurz <groug@kaod.org>
Acked-by: David Gibson <david@gibson.dropbear.id.au>
Message-Id: <20200630090351.1247703-8-armbru@redhat.com>
---
hw/ppc/spapr.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/hw/ppc/spapr.c b/hw/ppc/spapr.c
index 4c185bcc13..44fd578ea9 100644
--- a/hw/ppc/spapr.c
+++ b/hw/ppc/spapr.c
@@ -2731,6 +2731,7 @@ static void spapr_machine_init(MachineState *machine)
error_report_err(resize_hpt_err);
exit(1);
}
+ error_free(resize_hpt_err);
spapr->rma_size = spapr_rma_size(spapr, &error_fatal);
--
2.26.2
- [PULL 13/28] vnc: Plug minor memory leak in vnc_display_open(), (continued)
- [PULL 13/28] vnc: Plug minor memory leak in vnc_display_open(), Markus Armbruster, 2020/07/02
- [PULL 16/28] qdev: Drop qbus_set_hotplug_handler() parameter @errp, Markus Armbruster, 2020/07/02
- [PULL 28/28] migration/rdma: Plug memory leaks in qemu_rdma_registration_stop(), Markus Armbruster, 2020/07/02
- [PULL 19/28] riscv/sifive_u: Fix sifive_u_soc_realize() error API violations, Markus Armbruster, 2020/07/02
- [PULL 03/28] net/virtio: Fix failover_replug_primary() return value regression, Markus Armbruster, 2020/07/02
- [PULL 04/28] pci: Delete useless error_propagate(), Markus Armbruster, 2020/07/02
- [PULL 23/28] amd_iommu: Fix amdvi_realize() error API violation, Markus Armbruster, 2020/07/02
- [PULL 05/28] Clean up some calls to ignore Error objects the right way, Markus Armbruster, 2020/07/02
- [PULL 24/28] arm/stm32f205 arm/stm32f405: Fix realize error API violation, Markus Armbruster, 2020/07/02
- [PULL 25/28] aspeed: Fix realize error API violation, Markus Armbruster, 2020/07/02
- [PULL 09/28] spapr: Plug minor memory leak in spapr_machine_init(),
Markus Armbruster <=
- [PULL 27/28] arm/{bcm2835, fsl-imx25, fsl-imx6}: Fix realize error API violations, Markus Armbruster, 2020/07/02
- [PULL 18/28] hw/arm: Drop useless object_property_set_link() error handling, Markus Armbruster, 2020/07/02
- [PULL 26/28] hw/arm/armsse: Fix armsse_realize() error API violation, Markus Armbruster, 2020/07/02
- [PULL 21/28] mips/cps: Fix mips_cps_realize() error API violations, Markus Armbruster, 2020/07/02
- [PULL 17/28] hw: Fix error API violation around object_property_set_link(), Markus Armbruster, 2020/07/02
- Re: [PULL 00/28] Error reporting patches patches for 2020-07-02, Peter Maydell, 2020/07/02