From: Pan Nengyuan <pannengy...@huawei.com> Missing g_error_free in pdb_init_from_file() 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> Reviewed-by: Thomas Huth <th...@redhat.com> Message-Id: <20201023061218.2080844-5-kuhn.chen...@huawei.com> Signed-off-by: Laurent Vivier <laur...@vivier.eu> --- contrib/elf2dmp/pdb.c | 1 + 1 file changed, 1 insertion(+) diff --git a/contrib/elf2dmp/pdb.c b/contrib/elf2dmp/pdb.c index a5bd40c99dca..b3a65470680d 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.29.2