contrib/elf2dmp: Use g_malloc(), g_new() and g_free()
QEMU coding style uses the glib memory allocation APIs, not the raw libc malloc/free. Switch the allocation and free calls in elf2dmp to use these functions (dropping the now-unneeded checks for failure). Signed-off-by:Suraj Shirvankar <surajshirvankar@gmail.com> Message-id: 169753938460.23804.11418813007617535750-1@git.sr.ht [PMM: also remove NULL checks from g_malloc() calls; beef up commit message] Reviewed-by:
Peter Maydell <peter.maydell@linaro.org> Signed-off-by:
Peter Maydell <peter.maydell@linaro.org>
Showing
- contrib/elf2dmp/addrspace.c 2 additions, 5 deletionscontrib/elf2dmp/addrspace.c
- contrib/elf2dmp/main.c 3 additions, 6 deletionscontrib/elf2dmp/main.c
- contrib/elf2dmp/pdb.c 8 additions, 11 deletionscontrib/elf2dmp/pdb.c
- contrib/elf2dmp/qemu_elf.c 2 additions, 5 deletionscontrib/elf2dmp/qemu_elf.c
Loading
Please register or sign in to comment