]> git.proxmox.com Git - mirror_qemu.git/commit
lm32: do not leak memory on object_new/object_unref
authorPaolo Bonzini <pbonzini@redhat.com>
Tue, 1 Oct 2019 13:36:27 +0000 (15:36 +0200)
committerPaolo Bonzini <pbonzini@redhat.com>
Fri, 4 Oct 2019 16:49:17 +0000 (18:49 +0200)
commite97dd6b2b3d67ca575c491382b522415904bd552
tree3e9cdb330d7db300336746ad3fdf14852860566e
parent9739b11adcb81d0c4595ab5ea3fce1f5d50ce135
lm32: do not leak memory on object_new/object_unref

Bottom halves and ptimers are malloced, but nothing in these
files is freeing memory allocated by instance_init.  Since
these are sysctl devices that are never unrealized, just moving
the allocations to realize is enough to avoid the leak in
practice (and also to avoid upsetting asan when running
device-introspect-test).

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
hw/timer/lm32_timer.c
hw/timer/milkymist-sysctl.c