]> git.ipfire.org Git - thirdparty/qemu.git/commit
hw/audio/fmopl: fix segmentation fault
authorVolker Rümelin <vr_qemu@t-online.de>
Tue, 24 Mar 2020 06:18:55 +0000 (07:18 +0100)
committerGerd Hoffmann <kraxel@redhat.com>
Wed, 25 Mar 2020 08:55:40 +0000 (09:55 +0100)
commit95fad99cb28e9970944b01fd7af452f6f9f37484
tree3949a78318f5e2aa6c4d48652b01400706eb741c
parent112c37a6a6e4e0b607fd4514dffe402c69506cf8
hw/audio/fmopl: fix segmentation fault

Current code allocates the memory for ENV_CURVE too late. Move
allocation to OPLOpenTable() and deallocation to OPLCloseTable().

To reproduce the bug start qemu with -soundhw adlib.

Fixes 2eea51bd01 "hw/audio/fmopl: Move ENV_CURVE to .heap to save
32KiB of .bss"

Signed-off-by: Volker Rümelin <vr_qemu@t-online.de>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Message-id: 20200324061855.5951-1-vr_qemu@t-online.de
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
hw/audio/fmopl.c