aboutsummaryrefslogtreecommitdiff
path: root/hw/9pfs/9p-util-darwin.c
diff options
context:
space:
mode:
authorPaolo Bonzini <pbonzini@redhat.com>2024-11-14 13:53:18 +0100
committerMichael Tokarev <mjt@tls.msk.ru>2024-11-18 19:30:13 +0300
commite0af40f140553cc1d7f28e962b346bfab87fcf03 (patch)
treec827d90fe2e0d4dd7391e9fcaa4807ecd36bc10b /hw/9pfs/9p-util-darwin.c
parent2f52258ed70c550f8a027f6411156ea583615814 (diff)
hw/audio/hda: fix memory leak on audio setup
When SET_STREAM_FORMAT is called, the st->buft timer is overwritten, thus causing a memory leak. This was originally fixed in commit 816139ae6a5 ("hw/audio/hda: fix memory leak on audio setup", 2024-11-14) but that caused the audio to break in SPICE. Fortunately, a simpler fix is possible. The timer only needs to be reset, because the callback is always the same (st->output is set at realize time in hda_audio_init); call to timer_new_ns overkill. Replace it with timer_del and only initialize the timer once; for simplicity, do it even if use_timer is false. An even simpler fix would be to free the old time in hda_audio_setup(). However, it seems better to place the initialization of the timer close to that of st->ouput. Cc: qemu-stable@nongnu.org Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Reviewed-by: Michael Tokarev <mjt@tls.msk.ru> Message-ID: <20241114125318.1707590-3-pbonzini@redhat.com> Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org> (cherry picked from commit 626b39006d2f9b1378a04cb88a2187bb852cb055) Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
Diffstat (limited to 'hw/9pfs/9p-util-darwin.c')
0 files changed, 0 insertions, 0 deletions