diff mbox series

[2/7] contrib/elf2dmp: Always destroy PA space

Message ID 20240303-elf2dmp-v1-2-bea6649fe3e6@daynix.com (mailing list archive)
State New, archived
Headers show
Series contrib/elf2dmp: Improve robustness | expand

Commit Message

Akihiko Odaki March 3, 2024, 10:50 a.m. UTC
Destroy PA space even if paging base couldn't be found, fixing memory
leak.

Signed-off-by: Akihiko Odaki <akihiko.odaki@daynix.com>
---
 contrib/elf2dmp/main.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Peter Maydell March 4, 2024, 5:47 p.m. UTC | #1
On Sun, 3 Mar 2024 at 10:52, Akihiko Odaki <akihiko.odaki@daynix.com> wrote:
>
> Destroy PA space even if paging base couldn't be found, fixing memory
> leak.
>
> Signed-off-by: Akihiko Odaki <akihiko.odaki@daynix.com>
> ---
>  contrib/elf2dmp/main.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

Reviewed-by: Peter Maydell <peter.maydell@linaro.org>

thanks
-- PMM
diff mbox series

Patch

diff --git a/contrib/elf2dmp/main.c b/contrib/elf2dmp/main.c
index cbc38a7c103a..dd686280f981 100644
--- a/contrib/elf2dmp/main.c
+++ b/contrib/elf2dmp/main.c
@@ -553,7 +553,7 @@  int main(int argc, char *argv[])
     if (fix_dtb(&vs, &qemu_elf)) {
         eprintf("Failed to find paging base\n");
         err = 1;
-        goto out_elf;
+        goto out_ps;
     }
 
     printf("CPU #0 IDT is at 0x%016"PRIx64"\n", state->idt.base);