From dd662d5c57afd3419157194d758df44c7f6fe5d6 Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Wed, 21 May 2008 22:43:22 +0000 Subject: [PATCH] properly handle if pa_runtime_path() fails git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@2474 fefdeb5f-60dc-0310-8127-8f9354f1896f --- src/utils/pacmd.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/utils/pacmd.c b/src/utils/pacmd.c index dff9af9..7456060 100644 --- a/src/utils/pacmd.c +++ b/src/utils/pacmd.c @@ -65,7 +65,9 @@ int main(PA_GCC_UNUSED int argc, PA_GCC_UNUSED char*argv[]) { memset(&sa, 0, sizeof(sa)); sa.sun_family = AF_UNIX; - cli = pa_runtime_path("cli"); + if (!(cli = pa_runtime_path("cli"))) + goto fail; + pa_strlcpy(sa.sun_path, cli, sizeof(sa.sun_path)); pa_xfree(cli); -- 2.7.4