Skip to content

Commit

Permalink
hw/ppc/spapr.c: use g_autofree in spapr_dt_chosen()
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
danielhb authored and legoater committed Mar 2, 2022
1 parent 09a7e60 commit aebb9b9
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions hw/ppc/spapr.c
Expand Up @@ -1018,9 +1018,9 @@ static void spapr_dt_chosen(SpaprMachineState *spapr, void *fdt, bool reset)

if (reset) {
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;
char *bootlist = get_boot_devices_list(&cb);
g_autofree char *bootlist = get_boot_devices_list(&cb);

if (machine->kernel_cmdline && machine->kernel_cmdline[0]) {
_FDT(fdt_setprop_string(fdt, chosen, "bootargs",
Expand Down Expand Up @@ -1087,9 +1087,6 @@ static void spapr_dt_chosen(SpaprMachineState *spapr, void *fdt, bool reset)
}

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"));
Expand Down

0 comments on commit aebb9b9

Please sign in to comment.