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>
This commit is contained in:
Greg Kurz 2018-06-12 19:01:26 +02:00 committed by David Gibson
parent e493786c95
commit 2c9dfdacc5

View File

@ -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;
}
}