[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 5/7] spapr: Fix memory leak in h_client_architecture_support()
From: |
David Gibson |
Subject: |
[PULL 5/7] spapr: Fix memory leak in h_client_architecture_support() |
Date: |
Tue, 24 Mar 2020 16:14:54 +1100 |
From: Greg Kurz <address@hidden>
This is the only error path that needs to free the previously allocated
ov1.
Reported-by: Coverity (CID 1421924)
Fixes: cbd0d7f36322 "spapr: Fail CAS if option vector table cannot be parsed"
Signed-off-by: Greg Kurz <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: David Gibson <address@hidden>
Reviewed-by: Philippe Mathieu-Daudé <address@hidden>
---
hw/ppc/spapr_hcall.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/hw/ppc/spapr_hcall.c b/hw/ppc/spapr_hcall.c
index 40c86e91eb..0d50fc9117 100644
--- a/hw/ppc/spapr_hcall.c
+++ b/hw/ppc/spapr_hcall.c
@@ -1726,6 +1726,7 @@ static target_ulong
h_client_architecture_support(PowerPCCPU *cpu,
}
ov5_guest = spapr_ovec_parse_vector(ov_table, 5);
if (!ov5_guest) {
+ spapr_ovec_cleanup(ov1_guest);
warn_report("guest didn't provide option vector 5");
return H_PARAMETER;
}
--
2.25.1
- [PULL 0/7] ppc-for-5.0 queue 20200324, David Gibson, 2020/03/24
- [PULL 1/7] ppc/spapr: Set the effective address provided flag in mc error log., David Gibson, 2020/03/24
- [PULL 5/7] spapr: Fix memory leak in h_client_architecture_support(),
David Gibson <=
- [PULL 4/7] target/ppc: don't byte swap ELFv2 signal handler, David Gibson, 2020/03/24
- [PULL 3/7] target/ppc: Fix ISA v3.0 (POWER9) slbia implementation, David Gibson, 2020/03/24
- [PULL 6/7] hw/ppc: Take QEMU lock when calling ppc_dcr_read/write(), David Gibson, 2020/03/24
- [PULL 2/7] target/ppc: Fix slbia TLB invalidation gap, David Gibson, 2020/03/24
- [PULL 7/7] ppc/ppc405_boards: Remove unnecessary NULL check, David Gibson, 2020/03/24
- Re: [PULL 0/7] ppc-for-5.0 queue 20200324, Peter Maydell, 2020/03/24