diff options
author | Pan Nengyuan | 2020-10-23 08:12:15 +0200 |
---|---|---|
committer | Laurent Vivier | 2020-12-13 23:56:16 +0100 |
commit | 0c4c8671d79023a05d916e73d9b4399abff9c0a0 (patch) | |
tree | 3980124c4dedc923b6982ccf59c4d3470a7794fa /contrib | |
parent | elf2dmp/qemu_elf: Plug memleak in QEMU_Elf_init (diff) | |
download | qemu-0c4c8671d79023a05d916e73d9b4399abff9c0a0.tar.gz qemu-0c4c8671d79023a05d916e73d9b4399abff9c0a0.tar.xz qemu-0c4c8671d79023a05d916e73d9b4399abff9c0a0.zip |
elf2dmp/pdb: Plug memleak in pdb_init_from_file
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: Viktor Prutyanov <viktor.prutyanov@phystech.edu>
Reviewed-by: Li Qiang <liq3ea@gmail.com>
Signed-off-by: Chen Qun <kuhn.chenqun@huawei.com>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Message-Id: <20201023061218.2080844-5-kuhn.chenqun@huawei.com>
Signed-off-by: Laurent Vivier <laurent@vivier.eu>
Diffstat (limited to 'contrib')
-rw-r--r-- | contrib/elf2dmp/pdb.c | 1 |
1 files changed, 1 insertions, 0 deletions
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; } |