summaryrefslogtreecommitdiffstats
path: root/src/utils/pacmd.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2008-05-15 23:34:41 +0000
committerLennart Poettering <lennart@poettering.net>2008-05-15 23:34:41 +0000
commit045c1d602dcba57868845ba3270510593c39480f (patch)
treeb3d61f180e6fa40f97a80aa3e46d7c910ed7c2a6 /src/utils/pacmd.c
parent91f092eadcc5e9075e04ae42df11de28ef5047a8 (diff)
merge glitch-free branch back into trunk
git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@2445 fefdeb5f-60dc-0310-8127-8f9354f1896f
Diffstat (limited to 'src/utils/pacmd.c')
-rw-r--r--src/utils/pacmd.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/utils/pacmd.c b/src/utils/pacmd.c
index daa6a96e..dff9af9d 100644
--- a/src/utils/pacmd.c
+++ b/src/utils/pacmd.c
@@ -36,6 +36,7 @@
#include <pulse/error.h>
#include <pulse/util.h>
+#include <pulse/xmalloc.h>
#include <pulsecore/core-util.h>
#include <pulsecore/log.h>
@@ -49,6 +50,7 @@ int main(PA_GCC_UNUSED int argc, PA_GCC_UNUSED char*argv[]) {
char ibuf[256], obuf[256];
size_t ibuf_index, ibuf_length, obuf_index, obuf_length;
fd_set ifds, ofds;
+ char *cli;
if (pa_pid_file_check_running(&pid, "pulseaudio") < 0) {
pa_log("no PulseAudio daemon running");
@@ -62,7 +64,10 @@ int main(PA_GCC_UNUSED int argc, PA_GCC_UNUSED char*argv[]) {
memset(&sa, 0, sizeof(sa));
sa.sun_family = AF_UNIX;
- pa_runtime_path("cli", sa.sun_path, sizeof(sa.sun_path));
+
+ cli = pa_runtime_path("cli");
+ pa_strlcpy(sa.sun_path, cli, sizeof(sa.sun_path));
+ pa_xfree(cli);
for (i = 0; i < 5; i++) {
int r;