diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/pulse/context.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/pulse/context.c b/src/pulse/context.c index 1e5fa634..f56cb241 100644 --- a/src/pulse/context.c +++ b/src/pulse/context.c @@ -858,7 +858,11 @@ int pa_context_connect( if (!(flags & PA_CONTEXT_NOAUTOSPAWN) && c->conf->autospawn) { char *lf; - lf = pa_runtime_path(AUTOSPAWN_LOCK); + if (!(lf = pa_runtime_path(AUTOSPAWN_LOCK))) { + pa_context_fail(c, PA_ERR_ACCESS); + goto finish; + } + pa_assert(c->autospawn_lock_fd <= 0); c->autospawn_lock_fd = pa_lock_lockfile(lf); pa_xfree(lf); |