summaryrefslogtreecommitdiffstats
path: root/src/utils/padsp.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/utils/padsp.c')
-rw-r--r--src/utils/padsp.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/src/utils/padsp.c b/src/utils/padsp.c
index 882522c4..2ed0a039 100644
--- a/src/utils/padsp.c
+++ b/src/utils/padsp.c
@@ -1394,11 +1394,13 @@ static int sndstat_open(int flags, int *_errno) {
"Mixers:\n"
"0: PulseAudio Virtual OSS\n";
- char fn[] = "/tmp/padsp-sndstat-XXXXXX";
+ char *fn;
mode_t u;
int fd = -1;
int e;
+ fn = pa_sprintf_malloc("%s" PA_PATH_SEP "padsp-sndstat-XXXXXX", pa_get_temp_dir());
+
debug(DEBUG_LEVEL_NORMAL, __FILE__": sndstat_open()\n");
if (flags != O_RDONLY
@@ -1423,6 +1425,7 @@ static int sndstat_open(int flags, int *_errno) {
}
unlink(fn);
+ pa_xfree(fn);
if (write(fd, sndstat, sizeof(sndstat) -1) != sizeof(sndstat)-1) {
*_errno = errno;
@@ -1439,6 +1442,7 @@ static int sndstat_open(int flags, int *_errno) {
return fd;
fail:
+ pa_xfree(fn);
if (fd >= 0)
close(fd);
return -1;
@@ -1821,7 +1825,7 @@ fail:
pa_threaded_mainloop_unlock(i->mainloop);
- return 0;
+ return r;
}
static int dsp_trigger(fd_info *i) {
@@ -1864,7 +1868,7 @@ fail:
pa_threaded_mainloop_unlock(i->mainloop);
- return 0;
+ return r;
}
static int dsp_cork(fd_info *i, pa_stream *s, int b) {
@@ -1902,7 +1906,7 @@ fail:
pa_threaded_mainloop_unlock(i->mainloop);
- return 0;
+ return r;
}
static int dsp_ioctl(fd_info *i, unsigned long request, void*argp, int *_errno) {