]> git.proxmox.com Git - mirror_qemu.git/commit
contrib/elf2dmp: Use g_malloc(), g_new() and g_free()
authorSuraj Shirvankar <surajshirvankar@gmail.com>
Tue, 3 Oct 2023 12:45:14 +0000 (14:45 +0200)
committerPeter Maydell <peter.maydell@linaro.org>
Thu, 19 Oct 2023 13:32:13 +0000 (14:32 +0100)
commit2a052b4ee01b3c413cef2ef49cb780cde17d4ba1
treeca659b30aacebc24516ffc9dcc9f38f3130ae4c5
parent9ef2629712680e70cbf39d8b6cb1ec0e0e2e72fa
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>
contrib/elf2dmp/addrspace.c
contrib/elf2dmp/main.c
contrib/elf2dmp/pdb.c
contrib/elf2dmp/qemu_elf.c