summaryrefslogtreecommitdiffstats
path: root/src/pulse/context.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/pulse/context.c')
-rw-r--r--src/pulse/context.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/pulse/context.c b/src/pulse/context.c
index 2d92320f..07c3f3d0 100644
--- a/src/pulse/context.c
+++ b/src/pulse/context.c
@@ -752,11 +752,15 @@ static char *get_legacy_runtime_dir(void) {
p = pa_sprintf_malloc("/tmp/pulse-%s", u);
- if (stat(p, &st) < 0)
+ if (stat(p, &st) < 0) {
+ pa_xfree(p);
return NULL;
+ }
- if (st.st_uid != getuid())
+ if (st.st_uid != getuid()) {
+ pa_xfree(p);
return NULL;
+ }
return p;
}