aboutsummaryrefslogtreecommitdiff
path: root/contrib/elf2dmp/main.c
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/elf2dmp/main.c')
-rw-r--r--contrib/elf2dmp/main.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/contrib/elf2dmp/main.c b/contrib/elf2dmp/main.c
index 6de5c9808e..cbc38a7c10 100644
--- a/contrib/elf2dmp/main.c
+++ b/contrib/elf2dmp/main.c
@@ -120,14 +120,11 @@ static KDDEBUGGER_DATA64 *get_kdbg(uint64_t KernBase, struct pdb_reader *pdb,
}
}
- kdbg = malloc(kdbg_hdr.Size);
- if (!kdbg) {
- return NULL;
- }
+ kdbg = g_malloc(kdbg_hdr.Size);
if (va_space_rw(vs, KdDebuggerDataBlock, kdbg, kdbg_hdr.Size, 0)) {
eprintf("Failed to extract entire KDBG\n");
- free(kdbg);
+ g_free(kdbg);
return NULL;
}
@@ -643,7 +640,7 @@ int main(int argc, char *argv[])
}
out_kdbg:
- free(kdbg);
+ g_free(kdbg);
out_pdb:
pdb_exit(&pdb);
out_pdb_file: