[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-ppc] [PATCH v2 12/18] hw/nvram/fw_cfg: Keep reference of file_
From: |
Thomas Huth |
Subject: |
Re: [Qemu-ppc] [PATCH v2 12/18] hw/nvram/fw_cfg: Keep reference of file_data in FWCfgState |
Date: |
Fri, 8 Mar 2019 08:02:12 +0100 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.5.0 |
On 08/03/2019 02.32, Philippe Mathieu-Daudé wrote:
> The 'file_data' is allocated by read_splashfile() (introduced in
> commit 3d3b8303c6f8). It is then used by fw_cfg_add_file(). Due
> to the contract interface of fw_cfg_add_file(), it has to be valid
> for the lifetime of the FwCfg object.
>
> Keep a reference of 'file_data' in FWCfgState to be able to
> free this memory in fw_cfg_common_unrealize().
> We can now remove the res_free() from the main() loop.
> The global boot_splash_filedata is now unused, remove it.
>
> Signed-off-by: Philippe Mathieu-Daudé <address@hidden>
> ---
> hw/nvram/fw_cfg.c | 10 ++++++----
> include/hw/nvram/fw_cfg.h | 1 +
> include/sysemu/sysemu.h | 1 -
> vl.c | 9 ---------
> 4 files changed, 7 insertions(+), 14 deletions(-)
Reviewed-by: Thomas Huth <address@hidden>
- Re: [Qemu-ppc] [PATCH v2 08/18] hw/nvram/fw_cfg: Move fw_cfg_file_slots_allocate() to common_realize(), (continued)
- [Qemu-ppc] [PATCH v2 11/18] hw/nvram/fw_cfg: Add boot_splash.time_le16 to FWCfgState, Philippe Mathieu-Daudé, 2019/03/07
- [Qemu-ppc] [PATCH v2 12/18] hw/nvram/fw_cfg: Keep reference of file_data in FWCfgState, Philippe Mathieu-Daudé, 2019/03/07
- [Qemu-ppc] [PATCH v2 13/18] hw/nvram/fw_cfg: Add QMP 'info fw_cfg' command, Philippe Mathieu-Daudé, 2019/03/07
- Re: [Qemu-ppc] [PATCH v2 13/18] hw/nvram/fw_cfg: Add QMP 'info fw_cfg' command, Eric Blake, 2019/03/07
- Re: [Qemu-ppc] [PATCH v2 13/18] hw/nvram/fw_cfg: Add QMP 'info fw_cfg' command, Philippe Mathieu-Daudé, 2019/03/08
- Re: [Qemu-ppc] [PATCH v2 13/18] hw/nvram/fw_cfg: Add QMP 'info fw_cfg' command, Eric Blake, 2019/03/08
- Re: [Qemu-ppc] [PATCH v2 13/18] hw/nvram/fw_cfg: Add QMP 'info fw_cfg' command, Philippe Mathieu-Daudé, 2019/03/08
- Re: [Qemu-ppc] [PATCH v2 13/18] hw/nvram/fw_cfg: Add QMP 'info fw_cfg' command, Laszlo Ersek, 2019/03/08
- Re: [Qemu-ppc] [PATCH v2 13/18] hw/nvram/fw_cfg: Add QMP 'info fw_cfg' command, Philippe Mathieu-Daudé, 2019/03/08
- Re: [Qemu-ppc] [Qemu-devel] [PATCH v2 13/18] hw/nvram/fw_cfg: Add QMP 'info fw_cfg' command, Markus Armbruster, 2019/03/09
- Re: [Qemu-ppc] [Qemu-devel] [PATCH v2 13/18] hw/nvram/fw_cfg: Add QMP 'info fw_cfg' command, Laszlo Ersek, 2019/03/12