[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH 04/12] elf2dmp/pdb: Plug memleak in pdb_init_from_file
From: |
Li Qiang |
Subject: |
Re: [PATCH 04/12] elf2dmp/pdb: Plug memleak in pdb_init_from_file |
Date: |
Wed, 26 Aug 2020 18:54:51 +0800 |
Pan Nengyuan <pannengyuan@huawei.com> 于2020年8月14日周五 下午6:51写道:
>
> Missing g_error_free in pdb_init_from_file() error path. Fix that.
>
> Reported-by: Euler Robot <euler.robot@huawei.com>
> Signed-off-by: Pan Nengyuan <pannengyuan@huawei.com>
Reviewed-by: Li Qiang <liq3ea@gmail.com>
> ---
> Cc: Viktor Prutyanov <viktor.prutyanov@phystech.edu>
> ---
> contrib/elf2dmp/pdb.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/contrib/elf2dmp/pdb.c b/contrib/elf2dmp/pdb.c
> index a5bd40c99d..b3a6547068 100644
> --- a/contrib/elf2dmp/pdb.c
> +++ b/contrib/elf2dmp/pdb.c
> @@ -285,6 +285,7 @@ int pdb_init_from_file(const char *name, struct
> pdb_reader *reader)
> reader->gmf = g_mapped_file_new(name, TRUE, &gerr);
> if (gerr) {
> eprintf("Failed to map PDB file \'%s\'\n", name);
> + g_error_free(gerr);
> return 1;
> }
>
> --
> 2.18.2
>
>
- [PATCH 01/12] qga/channel-posix: Plug memory leak in ga_channel_write_all(), (continued)
- [PATCH 01/12] qga/channel-posix: Plug memory leak in ga_channel_write_all(), Pan Nengyuan, 2020/08/14
- [PATCH 06/12] ui/gtk-gl-area: Plug memleak in gd_gl_area_create_context(), Pan Nengyuan, 2020/08/14
- [PATCH 08/12] migration/colo: Plug memleaks in colo_process_incoming_thread, Pan Nengyuan, 2020/08/14
- [PATCH 09/12] blockdev: Fix a memleak in drive_backup_prepare(), Pan Nengyuan, 2020/08/14
- [PATCH 07/12] target/i386/cpu: Fix memleak in x86_cpu_class_check_missing_features, Pan Nengyuan, 2020/08/14
- [PATCH 04/12] elf2dmp/pdb: Plug memleak in pdb_init_from_file, Pan Nengyuan, 2020/08/14
- [PATCH 02/12] hw/vfio/ap: Plug memleak in vfio_ap_get_group(), Pan Nengyuan, 2020/08/14
- [PATCH 12/12] test-util-sockets: Fix a memleak in test_socket_unix_abstract_good, Pan Nengyuan, 2020/08/14
- [PATCH 11/12] vnc-auth-sasl: Plug memleak in vnc_socket_ip_addr_string, Pan Nengyuan, 2020/08/14