[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH RESEND v2 3/7] elf2dmp/qemu_elf: Plug memleak in QEMU_Elf_ini
From: |
Thomas Huth |
Subject: |
Re: [PATCH RESEND v2 3/7] elf2dmp/qemu_elf: Plug memleak in QEMU_Elf_init |
Date: |
Fri, 23 Oct 2020 09:22:03 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.6.0 |
On 23/10/2020 08.12, Chen Qun wrote:
> From: Pan Nengyuan <pannengyuan@huawei.com>
>
> Missing g_error_free in QEMU_Elf_init() error path. Fix that.
>
> Reported-by: Euler Robot <euler.robot@huawei.com>
> Signed-off-by: Pan Nengyuan <pannengyuan@huawei.com>
> Reviewed-by: Viktor Prutyanov <viktor.prutyanov@phystech.edu>
> Reviewed-by: Li Qiang <liq3ea@gmail.com>
> Signed-off-by: Chen Qun <kuhn.chenqun@huawei.com>
> ---
> contrib/elf2dmp/qemu_elf.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/contrib/elf2dmp/qemu_elf.c b/contrib/elf2dmp/qemu_elf.c
> index 0db7816586..b601b6d7ba 100644
> --- a/contrib/elf2dmp/qemu_elf.c
> +++ b/contrib/elf2dmp/qemu_elf.c
> @@ -126,6 +126,7 @@ int QEMU_Elf_init(QEMU_Elf *qe, const char *filename)
> qe->gmf = g_mapped_file_new(filename, TRUE, &gerr);
> if (gerr) {
> eprintf("Failed to map ELF dump file \'%s\'\n", filename);
> + g_error_free(gerr);
> return 1;
> }
>
>
Reviewed-by: Thomas Huth <thuth@redhat.com>
- [PATCH RESEND v2 0/7] some memleak trivial patchs, Chen Qun, 2020/10/23
- [PATCH RESEND v2 4/7] elf2dmp/pdb: Plug memleak in pdb_init_from_file, Chen Qun, 2020/10/23
- [PATCH RESEND v2 7/7] block/file-posix: fix a possible undefined behavior, Chen Qun, 2020/10/23
- [PATCH RESEND v2 1/7] tests/migration: fix memleak in wait_command/wait_command_fd, Chen Qun, 2020/10/23
- [PATCH RESEND v2 5/7] migration/colo: Plug memleaks in colo_process_incoming_thread, Chen Qun, 2020/10/23
- [PATCH RESEND v2 2/7] qga/channel-posix: Plug memory leak in ga_channel_write_all(), Chen Qun, 2020/10/23
- [PATCH RESEND v2 3/7] elf2dmp/qemu_elf: Plug memleak in QEMU_Elf_init, Chen Qun, 2020/10/23
- Re: [PATCH RESEND v2 3/7] elf2dmp/qemu_elf: Plug memleak in QEMU_Elf_init,
Thomas Huth <=
- [PATCH RESEND v2 6/7] blockdev: Fix a memleak in drive_backup_prepare(), Chen Qun, 2020/10/23
- RE: [PATCH RESEND v2 0/7] some memleak trivial patchs, Chenqun (kuhn), 2020/10/30