hw/ppc/spapr.c: use g_autofree in spapr_dt_chosen()
Signed-off-by: Daniel Henrique Barboza <danielhb413@gmail.com> Reviewed-by: David Gibson <david@gibson.dropbear.id.au> Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Message-Id: <20220228175004.8862-2-danielhb413@gmail.com> Signed-off-by: Cédric Le Goater <clg@kaod.org>
This commit is contained in:
parent
09a7e60c64
commit
aebb9b9cb2
|
@ -1018,9 +1018,9 @@ static void spapr_dt_chosen(SpaprMachineState *spapr, void *fdt, bool reset)
|
||||||
|
|
||||||
if (reset) {
|
if (reset) {
|
||||||
const char *boot_device = spapr->boot_device;
|
const char *boot_device = spapr->boot_device;
|
||||||
char *stdout_path = spapr_vio_stdout_path(spapr->vio_bus);
|
g_autofree char *stdout_path = spapr_vio_stdout_path(spapr->vio_bus);
|
||||||
size_t cb = 0;
|
size_t cb = 0;
|
||||||
char *bootlist = get_boot_devices_list(&cb);
|
g_autofree char *bootlist = get_boot_devices_list(&cb);
|
||||||
|
|
||||||
if (machine->kernel_cmdline && machine->kernel_cmdline[0]) {
|
if (machine->kernel_cmdline && machine->kernel_cmdline[0]) {
|
||||||
_FDT(fdt_setprop_string(fdt, chosen, "bootargs",
|
_FDT(fdt_setprop_string(fdt, chosen, "bootargs",
|
||||||
|
@ -1087,9 +1087,6 @@ static void spapr_dt_chosen(SpaprMachineState *spapr, void *fdt, bool reset)
|
||||||
}
|
}
|
||||||
|
|
||||||
spapr_dt_ov5_platform_support(spapr, fdt, chosen);
|
spapr_dt_ov5_platform_support(spapr, fdt, chosen);
|
||||||
|
|
||||||
g_free(stdout_path);
|
|
||||||
g_free(bootlist);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
_FDT(spapr_dt_ovec(fdt, chosen, spapr->ov5_cas, "ibm,architecture-vec-5"));
|
_FDT(spapr_dt_ovec(fdt, chosen, spapr->ov5_cas, "ibm,architecture-vec-5"));
|
||||||
|
|
Loading…
Reference in New Issue