aboutsummaryrefslogtreecommitdiff
path: root/audio/ossaudio.c
diff options
context:
space:
mode:
authormalc <av1474@comtv.ru>2009-09-14 03:51:48 +0400
committermalc <av1474@comtv.ru>2009-09-14 03:55:42 +0400
commit6ebfda13a694225e5b7ccc03c8a5e03f1c55a614 (patch)
tree0a36f7b9780a090a91a688045d00f6cb3e49d777 /audio/ossaudio.c
parent9332f6a2e25cbd9c93b0ab8e46d9f5774d620478 (diff)
downloadqemu-6ebfda13a694225e5b7ccc03c8a5e03f1c55a614.zip
qemu-6ebfda13a694225e5b7ccc03c8a5e03f1c55a614.tar.gz
qemu-6ebfda13a694225e5b7ccc03c8a5e03f1c55a614.tar.bz2
alsa/oss: Remove fd transfer handlers before closing oss/alsa fd/handle
Signed-off-by: malc <av1474@comtv.ru>
Diffstat (limited to 'audio/ossaudio.c')
-rw-r--r--audio/ossaudio.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/audio/ossaudio.c b/audio/ossaudio.c
index ecb8839..0b391e4 100644
--- a/audio/ossaudio.c
+++ b/audio/ossaudio.c
@@ -114,11 +114,13 @@ static void GCC_FMT_ATTR (3, 4) oss_logerr2 (
static void oss_anal_close (int *fdp)
{
- int err = close (*fdp);
+ int err;
+
+ qemu_set_fd_handler (*fdp, NULL, NULL, NULL);
+ err = close (*fdp);
if (err) {
oss_logerr (errno, "Failed to close file(fd=%d)\n", *fdp);
}
- qemu_set_fd_handler (*fdp, NULL, NULL, NULL);
*fdp = -1;
}