Skip to content
Snippets Groups Projects
Commit 4bb59236 authored by lu zhipeng's avatar lu zhipeng Committed by Laurent Vivier
Browse files

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: default avatarlu zhipeng <luzhipeng@cestc.cn>
Reviewed-by: default avatarViktor Prutyanov <viktor.prutyanov@phystech.edu>
Reviewed-by: default avatarPhilippe Mathieu-Daudé <philmd@linaro.org>
Message-Id: <20221007020128.760-1-luzhipeng@cestc.cn>
Signed-off-by: default avatarLaurent Vivier <laurent@vivier.eu>
parent 2d727998
No related branches found
No related tags found
No related merge requests found
......@@ -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;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment