mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-05 00:33:55 -06:00
portio: keep references on portio
The isa_register_portio_list() function allocates ioports data/state. Let's keep the reference to this data on some owner. This isn't enough to fix leaks, but at least, ASAN stops complaining of direct leaks. Further cleanup would require calling portio_list_del/destroy(). Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
This commit is contained in:
parent
bd794065ff
commit
e305a16510
11 changed files with 41 additions and 22 deletions
|
@ -553,10 +553,12 @@ static void i8257_realize(DeviceState *dev, Error **errp)
|
|||
memory_region_add_subregion(isa_address_space_io(isa),
|
||||
d->base, &d->channel_io);
|
||||
|
||||
isa_register_portio_list(isa, d->page_base, page_portio_list, d,
|
||||
isa_register_portio_list(isa, &d->portio_page,
|
||||
d->page_base, page_portio_list, d,
|
||||
"dma-page");
|
||||
if (d->pageh_base >= 0) {
|
||||
isa_register_portio_list(isa, d->pageh_base, pageh_portio_list, d,
|
||||
isa_register_portio_list(isa, &d->portio_pageh,
|
||||
d->pageh_base, pageh_portio_list, d,
|
||||
"dma-pageh");
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue