aboutsummaryrefslogtreecommitdiff
path: root/hw/hppa/dino.c
diff options
context:
space:
mode:
authorPaolo Bonzini <pbonzini@redhat.com>2019-10-01 15:36:24 +0200
committerPaolo Bonzini <pbonzini@redhat.com>2019-10-04 18:49:17 +0200
commit266a880e31d58539a1c7f0177690a047f5016505 (patch)
tree3d14a74ab6a857f507aad83184094a9771cfa85e /hw/hppa/dino.c
parent67c1ea9940afd73ebc66987672617b6694ba1e4a (diff)
downloadqemu-266a880e31d58539a1c7f0177690a047f5016505.zip
qemu-266a880e31d58539a1c7f0177690a047f5016505.tar.gz
qemu-266a880e31d58539a1c7f0177690a047f5016505.tar.bz2
hppa: fix leak from g_strdup_printf
memory_region_init_* takes care of copying the name into memory it owns. Free it in the caller. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Diffstat (limited to 'hw/hppa/dino.c')
-rw-r--r--hw/hppa/dino.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/hw/hppa/dino.c b/hw/hppa/dino.c
index e0466ee..ab6969b 100644
--- a/hw/hppa/dino.c
+++ b/hw/hppa/dino.c
@@ -485,6 +485,7 @@ PCIBus *dino_init(MemoryRegion *addr_space,
memory_region_init_alias(&s->pci_mem_alias[i], OBJECT(s),
name, &s->pci_mem, addr,
DINO_MEM_CHUNK_SIZE);
+ g_free(name);
}
/* Set up PCI view of memory: Bus master address space. */