[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v3 07/26] spapr: Plug minor memory leak in spapr_machine_init()
From: |
Markus Armbruster |
Subject: |
[PATCH v3 07/26] spapr: Plug minor memory leak in spapr_machine_init() |
Date: |
Tue, 30 Jun 2020 11:03:32 +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>
---
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
- [PATCH v3 00/26] Error handling fixes & cleanups, Markus Armbruster, 2020/06/30
- [PATCH v3 04/26] tests: Use &error_abort where appropriate, Markus Armbruster, 2020/06/30
- [PATCH v3 10/26] test-util-filemonitor: Plug unlikely memory leak, Markus Armbruster, 2020/06/30
- [PATCH v3 05/26] tests: Use error_free_or_abort() where appropriate, Markus Armbruster, 2020/06/30
- [PATCH v3 08/26] qga: Plug unlikely memory leak in guest-set-memory-blocks, Markus Armbruster, 2020/06/30
- [PATCH v3 07/26] spapr: Plug minor memory leak in spapr_machine_init(),
Markus Armbruster <=
- [PATCH v3 09/26] sd/milkymist-memcard: Plug minor memory leak in realize, Markus Armbruster, 2020/06/30
- [PATCH v3 12/26] aspeed: Clean up roundabout error propagation, Markus Armbruster, 2020/06/30
- [PATCH v3 13/26] qdev: Drop qbus_set_bus_hotplug_handler() parameter @errp, Markus Armbruster, 2020/06/30
- [PATCH v3 14/26] qdev: Drop qbus_set_hotplug_handler() parameter @errp, Markus Armbruster, 2020/06/30
- [PATCH v3 03/26] Clean up some calls to ignore Error objects the right way, Markus Armbruster, 2020/06/30
- [PATCH v3 22/26] arm/stm32f205 arm/stm32f405: Fix realize error API violation, Markus Armbruster, 2020/06/30
- [PATCH v3 20/26] x86: Fix x86_cpu_new() error handling, Markus Armbruster, 2020/06/30