summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrian Cameron <brian.cameron@sun.com>2009-05-10 01:03:05 +0200
committerLennart Poettering <lennart@poettering.net>2009-05-10 01:03:05 +0200
commit33e3a5daf880db61b58013143acff29bfcf283d1 (patch)
tree00130bd3015db4ce882f3c6dc7fbaacb9ea200ac
parent84b4db13c33d62918461221f6f108355aea34565 (diff)
downloadlibcanberra-33e3a5daf880db61b58013143acff29bfcf283d1.tar.gz
oss: initialize oss fd properly to avoid closing inappropriate file descriptors
-rw-r--r--src/oss.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/oss.c b/src/oss.c
index 9683ceb..866c863 100644
--- a/src/oss.c
+++ b/src/oss.c
@@ -422,6 +422,7 @@ int driver_play(ca_context *c, uint32_t id, ca_proplist *proplist, ca_finish_cal
out->callback = cb;
out->userdata = userdata;
out->pipe_fd[0] = out->pipe_fd[1] = -1;
+ out->pcm = -1;
if (pipe(out->pipe_fd) < 0) {
ret = CA_ERROR_SYSTEM;