diff options
author | Daniel Henrique Barboza <danielhb413@gmail.com> | 2022-03-02 06:51:39 +0100 |
---|---|---|
committer | Cédric Le Goater <clg@kaod.org> | 2022-03-02 06:51:39 +0100 |
commit | aebb9b9cb2738c2a0b21c7315822fac7d9bb5004 (patch) | |
tree | 775fd50e2afed13920abd09c3738c066fadcc376 | |
parent | 09a7e60c6411c7c390aa392672fbdbef5e5e2084 (diff) |
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>
-rw-r--r-- | hw/ppc/spapr.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/hw/ppc/spapr.c b/hw/ppc/spapr.c index f0b75b22bb..c74543ace3 100644 --- a/hw/ppc/spapr.c +++ b/hw/ppc/spapr.c @@ -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", @@ -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")); |