diff options
author | Peter Maydell <peter.maydell@linaro.org> | 2014-12-16 16:58:05 +0000 |
---|---|---|
committer | Michael Roth <mdroth@linux.vnet.ibm.com> | 2015-01-14 17:08:43 -0600 |
commit | 73c1527f96193ce9f7c7485999cdf96eea885c2c (patch) | |
tree | b0a7efc14b5755b14d67b21f843fe7f3840ab4d1 /migration-unix.c | |
parent | b466e1731be837483c7bbcf1770bbcf707477a77 (diff) | |
download | qemu-73c1527f96193ce9f7c7485999cdf96eea885c2c.tar.gz |
audio: Don't free hw resources until after hw backend is stopped
When stopping an audio voice, call the audio backend's fini
method before calling audio_pcm_hw_free_resources_ rather than
afterwards. This allows backends which use helper threads (like
pulseaudio) to terminate those threads before the conv_buf or
mix_buf are freed and avoids race conditions where the helper
may access a NULL pointer or freed memory.
Cc: qemu-stable@nongnu.org
Reviewed-by: Gerd Hoffmann <kraxel@redhat.com>
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Message-id: 1418406239-9838-1-git-send-email-peter.maydell@linaro.org
(cherry picked from commit b28fb27b5edf77f6fd0ac550a156fb20f2218db3)
Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
Diffstat (limited to 'migration-unix.c')
0 files changed, 0 insertions, 0 deletions