aboutsummaryrefslogtreecommitdiff
path: root/hw/ppc/spapr_hcall.c
diff options
context:
space:
mode:
authorGreg Kurz <groug@kaod.org>2018-06-12 19:01:26 +0200
committerDavid Gibson <david@gibson.dropbear.id.au>2018-06-16 16:32:33 +1000
commit2c9dfdacc5a9f4db941c8f80597abae4658954ac (patch)
treedccc2537173fc140103cac35d27568d57c76ce44 /hw/ppc/spapr_hcall.c
parente493786c9585d3f1d1a951c46c656821a47f5b34 (diff)
downloadqemu-2c9dfdacc5a9f4db941c8f80597abae4658954ac.zip
qemu-2c9dfdacc5a9f4db941c8f80597abae4658954ac.tar.gz
qemu-2c9dfdacc5a9f4db941c8f80597abae4658954ac.tar.bz2
spapr: fix leak in h_client_architecture_support()
If the negotiated compat mode can't be set, but raw mode is supported, we decide to ignore the error. An so, we should free it to prevent a memory leak. Signed-off-by: Greg Kurz <groug@kaod.org> Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Diffstat (limited to 'hw/ppc/spapr_hcall.c')
-rw-r--r--hw/ppc/spapr_hcall.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/hw/ppc/spapr_hcall.c b/hw/ppc/spapr_hcall.c
index 022f6d8..8b9a4b5 100644
--- a/hw/ppc/spapr_hcall.c
+++ b/hw/ppc/spapr_hcall.c
@@ -1547,6 +1547,7 @@ static target_ulong h_client_architecture_support(PowerPCCPU *cpu,
error_report_err(local_err);
return H_HARDWARE;
}
+ error_free(local_err);
local_err = NULL;
}
}