aboutsummaryrefslogtreecommitdiff
path: root/gdb-xml/s390-acr.xml
diff options
context:
space:
mode:
authorManos Pitsidianakis <manos.pitsidianakis@linaro.org>2023-11-16 09:20:46 +0200
committerMichael S. Tsirkin <mst@redhat.com>2023-12-02 15:56:49 -0500
commitf7856181849939ecb096dd1d0068b674fe2c69ff (patch)
tree6aac24cea989fcef25288aafd4764724989b236c /gdb-xml/s390-acr.xml
parent691d3d8bbde16abd002a2590fa422b079d0c8468 (diff)
downloadqemu-f7856181849939ecb096dd1d0068b674fe2c69ff.zip
qemu-f7856181849939ecb096dd1d0068b674fe2c69ff.tar.gz
qemu-f7856181849939ecb096dd1d0068b674fe2c69ff.tar.bz2
virtio-sound: add realize() error cleanup path
QEMU crashes on exit when a virtio-sound device has failed to realise. Its vmstate field was not cleaned up properly with qemu_del_vm_change_state_handler(). This patch changes the realize() order as 1. Validate the given configuration values (no resources allocated by us either on success or failure) 2. Try AUD_register_card() and return on failure (no resources allocated by us on failure) 3. Initialize vmstate, virtio device, heap allocations and stream parameters at once. If error occurs, goto error_cleanup label which calls virtio_snd_unrealize(). This cleans up all resources made in steps 1-3. Reported-by: Volker Rümelin <vr_qemu@t-online.de> Fixes: 2880e676c000 ("Add virtio-sound device stub") Signed-off-by: Manos Pitsidianakis <manos.pitsidianakis@linaro.org> Message-Id: <20231116072046.4002957-1-manos.pitsidianakis@linaro.org> Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Diffstat (limited to 'gdb-xml/s390-acr.xml')
0 files changed, 0 insertions, 0 deletions