mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-31 05:51:53 -06:00
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>
This commit is contained in:
parent
db5127b28a
commit
f767b1ac57
1 changed files with 1 additions and 0 deletions
|
@ -1026,6 +1026,7 @@ int spapr_h_cas_compose_response(SpaprMachineState *spapr,
|
||||||
_FDT((fdt_pack(fdt)));
|
_FDT((fdt_pack(fdt)));
|
||||||
|
|
||||||
if (fdt_totalsize(fdt) + sizeof(hdr) > size) {
|
if (fdt_totalsize(fdt) + sizeof(hdr) > size) {
|
||||||
|
g_free(fdt);
|
||||||
trace_spapr_cas_failed(size);
|
trace_spapr_cas_failed(size);
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue