diff options
author | Daniel Mack <daniel@caiaq.de> | 2009-09-22 11:30:30 +0800 |
---|---|---|
committer | Daniel Mack <daniel@caiaq.de> | 2009-09-22 11:30:30 +0800 |
commit | 94aa9097f4ded68623160d754a4bf2632b8efc79 (patch) | |
tree | 94a5e1192a18f760dc00ff5b36e1f7ba36fd449b /src/utils/padsp.c | |
parent | c1e59f7d762fb147bc5250ebddb9cf5639aba522 (diff) | |
parent | c194db71b0ff853b4f46df26e135edf63b215451 (diff) |
Merge branch 'master' of git://0pointer.de/pulseaudio
Diffstat (limited to 'src/utils/padsp.c')
-rw-r--r-- | src/utils/padsp.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/utils/padsp.c b/src/utils/padsp.c index 41bfd741..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; |