Le 23/10/2020 à 08:12, Chen Qun a écrit :
> From: Pan Nengyuan <pannengy...@huawei.com>
> 
> Missing g_error_free in QEMU_Elf_init() error path. Fix that.
> 
> Reported-by: Euler Robot <euler.ro...@huawei.com>
> Signed-off-by: Pan Nengyuan <pannengy...@huawei.com>
> Reviewed-by: Viktor Prutyanov <viktor.prutya...@phystech.edu>
> Reviewed-by: Li Qiang <liq...@gmail.com>
> Signed-off-by: Chen Qun <kuhn.chen...@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;
>      }
>  
> 

Applied to my trivial-patches branch.

Thanks,
Laurent

Reply via email to