mirror of
https://gitlab.com/qemu-project/qemu
synced 2024-11-05 20:35:44 +00:00
elf2dmp: free memory in failure
The 'kdgb' is allocating memory in get_kdbg(), but it is not freed in error path. So fix that. Signed-off-by: lu zhipeng <luzhipeng@cestc.cn> Reviewed-by: Viktor Prutyanov <viktor.prutyanov@phystech.edu> Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org> Message-Id: <20221007020128.760-1-luzhipeng@cestc.cn> Signed-off-by: Laurent Vivier <laurent@vivier.eu>
This commit is contained in:
parent
2d7279984f
commit
4bb5923605
1 changed files with 1 additions and 0 deletions
|
@ -125,6 +125,7 @@ static KDDEBUGGER_DATA64 *get_kdbg(uint64_t KernBase, struct pdb_reader *pdb,
|
|||
|
||||
if (va_space_rw(vs, KdDebuggerDataBlock, kdbg, kdbg_hdr.Size, 0)) {
|
||||
eprintf("Failed to extract entire KDBG\n");
|
||||
free(kdbg);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue