diff options
author | Peter Maydell | 2016-09-08 16:22:50 +0200 |
---|---|---|
committer | Peter Maydell | 2016-09-08 16:22:50 +0200 |
commit | 33e60e01988b02ac9baf4dc0f4a452b39fb5ce55 (patch) | |
tree | 39674954d438bcb4ed08b5cec4520deb0db88888 /hw/isa/isa-bus.c | |
parent | Merge remote-tracking branch 'remotes/dgibson/tags/ppc-for-2.8-20160907' into... (diff) | |
parent | tests: fix postcopy-test leaks (diff) | |
download | qemu-33e60e01988b02ac9baf4dc0f4a452b39fb5ce55.tar.gz qemu-33e60e01988b02ac9baf4dc0f4a452b39fb5ce55.tar.xz qemu-33e60e01988b02ac9baf4dc0f4a452b39fb5ce55.zip |
Merge remote-tracking branch 'remotes/elmarco/tags/leak-pull-request' into staging
Pull request
v2:
- dropped "tests: fix small leak in test-io-channel-command" that Daniel Berrange will pick
- fixed "tests: add qtest_add_data_func_full" to work with glib < 2.26
# gpg: Signature made Thu 08 Sep 2016 15:16:54 BST
# gpg: using RSA key 0xDAE8E10975969CE5
# gpg: Good signature from "Marc-André Lureau <marcandre.lureau@redhat.com>"
# gpg: aka "Marc-André Lureau <marcandre.lureau@gmail.com>"
# gpg: WARNING: This key is not certified with sufficiently trusted signatures!
# gpg: It is not certain that the signature belongs to the owner.
# Primary key fingerprint: 87A9 BD93 3F87 C606 D276 F62D DAE8 E109 7596 9CE5
* remotes/elmarco/tags/leak-pull-request: (25 commits)
tests: fix postcopy-test leaks
tests: fix rsp leak in postcopy-test
tests: pc-cpu-test leaks fixes
tests: add qtest_add_data_func_full
bus: simplify name handling
ipmi: free extern timer
sd: free timer
pc: keep gsi reference
pc: free i8259
tests: fix qom-test leaks
acpi-build: fix array leak
machine: use class base init generated name
pc: don't leak a20_line
pc: simplify passing qemu_irq
portio: keep references on portio
tests: fix leak in test-string-input-visitor
tests: fix check-qom-proplist leaks
tests: fix check-qom-interface leaks
tests: fix test-iov leaks
tests: fix test-vmstate leaks
...
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'hw/isa/isa-bus.c')
-rw-r--r-- | hw/isa/isa-bus.c | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/hw/isa/isa-bus.c b/hw/isa/isa-bus.c index ce74db232a..9d07b118c0 100644 --- a/hw/isa/isa-bus.c +++ b/hw/isa/isa-bus.c @@ -131,24 +131,20 @@ void isa_register_ioport(ISADevice *dev, MemoryRegion *io, uint16_t start) isa_init_ioport(dev, start); } -void isa_register_portio_list(ISADevice *dev, uint16_t start, +void isa_register_portio_list(ISADevice *dev, + PortioList *piolist, uint16_t start, const MemoryRegionPortio *pio_start, void *opaque, const char *name) { - PortioList piolist; + assert(piolist && !piolist->owner); /* START is how we should treat DEV, regardless of the actual contents of the portio array. This is how the old code actually handled e.g. the FDC device. */ isa_init_ioport(dev, start); - /* FIXME: the device should store created PortioList in its state. Note - that DEV can be NULL here and that single device can register several - portio lists. Current implementation is leaking memory allocated - in portio_list_init. The leak is not critical because it happens only - at initialization time. */ - portio_list_init(&piolist, OBJECT(dev), pio_start, opaque, name); - portio_list_add(&piolist, isabus->address_space_io, start); + portio_list_init(piolist, OBJECT(dev), pio_start, opaque, name); + portio_list_add(piolist, isabus->address_space_io, start); } static void isa_device_init(Object *obj) |