[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 11/19] elf2dmp/pdb: Plug memleak in pdb_init_from_file
From: |
Laurent Vivier |
Subject: |
[PULL 11/19] elf2dmp/pdb: Plug memleak in pdb_init_from_file |
Date: |
Mon, 14 Dec 2020 16:57:25 +0100 |
From: Pan Nengyuan <pannengyuan@huawei.com>
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>
---
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
- [PULL 07/19] CODING_STYLE.rst: Be less strict about 80 character limit, (continued)
- [PULL 07/19] CODING_STYLE.rst: Be less strict about 80 character limit, Laurent Vivier, 2020/12/14
- [PULL 04/19] hw/xen: Don't use '#' flag of printf format, Laurent Vivier, 2020/12/14
- [PULL 14/19] configure: Remove the obsolete check for ifaddrs.h, Laurent Vivier, 2020/12/14
- [PULL 15/19] configure / meson: Move check for pty.h to meson.build, Laurent Vivier, 2020/12/14
- [PULL 16/19] configure / meson: Move check for drm.h to meson.build, Laurent Vivier, 2020/12/14
- [PULL 01/19] target/i386: tracing: format length values as hex, Laurent Vivier, 2020/12/14
- [PULL 05/19] hw/pci-host/pam: Replace magic number by PAM_REGIONS_COUNT definition, Laurent Vivier, 2020/12/14
- [PULL 03/19] MAINTAINERS: update my email address, Laurent Vivier, 2020/12/14
- [PULL 19/19] configure / meson: Move check for linux/btrfs.h to meson.build, Laurent Vivier, 2020/12/14
- [PULL 18/19] configure / meson: Move check for sys/kcov.h to meson.build, Laurent Vivier, 2020/12/14
- [PULL 11/19] elf2dmp/pdb: Plug memleak in pdb_init_from_file,
Laurent Vivier <=
- [PULL 09/19] configure: Test if $make actually exists, Laurent Vivier, 2020/12/14
- [PULL 10/19] elf2dmp/qemu_elf: Plug memleak in QEMU_Elf_init, Laurent Vivier, 2020/12/14
- [PULL 17/19] configure / meson: Move check for sys/signal.h to meson.build, Laurent Vivier, 2020/12/14
- [PULL 08/19] ads7846: moves from the hw/display folder to the hw/input folder., Laurent Vivier, 2020/12/14
- [PULL 13/19] blockdev: Fix a memleak in drive_backup_prepare(), Laurent Vivier, 2020/12/14
- [PULL 12/19] block/file-posix: fix a possible undefined behavior, Laurent Vivier, 2020/12/14
- [PULL 06/19] fsdev: open brace '{' following struct go on the same line, Laurent Vivier, 2020/12/14
- Re: [PULL 00/19] Trivial branch for 6.0 patches, Peter Maydell, 2020/12/15