[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v2 09/18] hw/nvram/fw_cfg: Free file_slots in co
From: |
Laszlo Ersek |
Subject: |
Re: [Qemu-devel] [PATCH v2 09/18] hw/nvram/fw_cfg: Free file_slots in common_unrealize() |
Date: |
Fri, 8 Mar 2019 11:31:12 +0100 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 |
On 03/08/19 02:32, Philippe Mathieu-Daudé wrote:
> Called by fw_cfg_common_realize(), fw_cfg_file_slots_allocate()
> allocates various buffers.
> Free them in fw_cfg_common_unrealize().
>
> Signed-off-by: Philippe Mathieu-Daudé <address@hidden>
> ---
> hw/nvram/fw_cfg.c | 4 ++++
> 1 file changed, 4 insertions(+)
>
> diff --git a/hw/nvram/fw_cfg.c b/hw/nvram/fw_cfg.c
> index ca58d279a4..b73a591eff 100644
> --- a/hw/nvram/fw_cfg.c
> +++ b/hw/nvram/fw_cfg.c
> @@ -971,6 +971,10 @@ static void fw_cfg_common_unrealize(DeviceState *dev,
> Error **errp)
> FWCfgState *s = FW_CFG(dev);
>
> g_free(s->files);
> +
> + g_free(s->entries[0]);
> + g_free(s->entries[1]);
> + g_free(s->entry_order);
> }
>
> FWCfgState *fw_cfg_init_io_dma(uint32_t iobase, uint32_t dma_iobase,
>
Reviewed-by: Laszlo Ersek <address@hidden>
- Re: [Qemu-devel] [PATCH v2 05/18] hw/nvram/fw_cfg: Use the ldst API, (continued)
- [Qemu-devel] [PATCH v2 06/18] hw/nvram/fw_cfg: Remove the unnecessary boot_splash_filedata_size, Philippe Mathieu-Daudé, 2019/03/07
- [Qemu-devel] [PATCH v2 07/18] hw/nvram/fw_cfg: Add fw_cfg_common_unrealize(), Philippe Mathieu-Daudé, 2019/03/07
- [Qemu-devel] [PATCH v2 08/18] hw/nvram/fw_cfg: Move fw_cfg_file_slots_allocate() to common_realize(), Philippe Mathieu-Daudé, 2019/03/07
- [Qemu-devel] [PATCH v2 09/18] hw/nvram/fw_cfg: Free file_slots in common_unrealize(), Philippe Mathieu-Daudé, 2019/03/07
- Re: [Qemu-devel] [PATCH v2 09/18] hw/nvram/fw_cfg: Free file_slots in common_unrealize(),
Laszlo Ersek <=
- [Qemu-devel] [PATCH v2 10/18] hw/nvram/fw_cfg: Add reboot_timeout to FWCfgState, Philippe Mathieu-Daudé, 2019/03/07
- Re: [Qemu-devel] [PATCH v2 10/18] hw/nvram/fw_cfg: Add reboot_timeout to FWCfgState, Michael S. Tsirkin, 2019/03/08
- [Qemu-devel] [PATCH v2 11/18] hw/nvram/fw_cfg: Add boot_splash.time_le16 to FWCfgState, Philippe Mathieu-Daudé, 2019/03/07
- [Qemu-devel] [PATCH v2 12/18] hw/nvram/fw_cfg: Keep reference of file_data in FWCfgState, Philippe Mathieu-Daudé, 2019/03/07
- [Qemu-devel] [PATCH v2 13/18] hw/nvram/fw_cfg: Add QMP 'info fw_cfg' command, Philippe Mathieu-Daudé, 2019/03/07