mirror of
https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
synced 2025-11-04 13:29:59 -05:00
properly handle if pa_runtime_path() fails
git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@2474 fefdeb5f-60dc-0310-8127-8f9354f1896f
This commit is contained in:
parent
341042b0aa
commit
dd662d5c57
1 changed files with 3 additions and 1 deletions
|
|
@ -65,7 +65,9 @@ int main(PA_GCC_UNUSED int argc, PA_GCC_UNUSED char*argv[]) {
|
||||||
memset(&sa, 0, sizeof(sa));
|
memset(&sa, 0, sizeof(sa));
|
||||||
sa.sun_family = AF_UNIX;
|
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_strlcpy(sa.sun_path, cli, sizeof(sa.sun_path));
|
||||||
pa_xfree(cli);
|
pa_xfree(cli);
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue