]> Git Repo - qemu.git/commitdiff
spapr: Plug minor memory leak in spapr_machine_init()
authorMarkus Armbruster <[email protected]>
Tue, 30 Jun 2020 09:03:32 +0000 (11:03 +0200)
committerMarkus Armbruster <[email protected]>
Thu, 2 Jul 2020 04:25:29 +0000 (06:25 +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 <[email protected]>
Cc: [email protected]
Signed-off-by: Markus Armbruster <[email protected]>
Reviewed-by: Greg Kurz <[email protected]>
Acked-by: David Gibson <[email protected]>
Message-Id: <20200630090351.1247703[email protected]>

hw/ppc/spapr.c

index 4c185bcc13b302d2e7c60d8f18d076e9fd78311f..44fd578ea96493f57b1ed78a88787f484855465e 100644 (file)
@@ -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);
 
This page took 0.034037 seconds and 4 git commands to generate.