diff options
author | Alexey Kardashevskiy | 2019-08-23 04:39:57 +0200 |
---|---|---|
committer | David Gibson | 2019-10-04 02:25:23 +0200 |
commit | f767b1ac5766fcc48cc3939eeb7db7b95b98408b (patch) | |
tree | 43d9adf64b350ad665b879a89d2305c4ee09b928 | |
parent | spapr: Move handling of special NVLink numa node from reset to init (diff) | |
download | qemu-f767b1ac5766fcc48cc3939eeb7db7b95b98408b.tar.gz qemu-f767b1ac5766fcc48cc3939eeb7db7b95b98408b.tar.xz qemu-f767b1ac5766fcc48cc3939eeb7db7b95b98408b.zip |
spapr: Fixes a leak in CAS
Add a missing g_free(fdt) if the resulting tree is bigger
than the space allocated by SLOF.
Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Reviewed-by: Greg Kurz <groug@kaod.org>
Reviewed-by: Cédric Le Goater <clg@kaod.org>
-rw-r--r-- | hw/ppc/spapr.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/hw/ppc/spapr.c b/hw/ppc/spapr.c index 7c3a443776..c69c034183 100644 --- a/hw/ppc/spapr.c +++ b/hw/ppc/spapr.c @@ -1026,6 +1026,7 @@ int spapr_h_cas_compose_response(SpaprMachineState *spapr, _FDT((fdt_pack(fdt))); if (fdt_totalsize(fdt) + sizeof(hdr) > size) { + g_free(fdt); trace_spapr_cas_failed(size); return -1; } |