mirror of
https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
synced 2025-11-04 13:29:59 -05:00
fix a minor memory leak
git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@2486 fefdeb5f-60dc-0310-8127-8f9354f1896f
This commit is contained in:
parent
28405e3dcf
commit
d332439065
1 changed files with 6 additions and 2 deletions
|
|
@ -752,11 +752,15 @@ static char *get_legacy_runtime_dir(void) {
|
||||||
|
|
||||||
p = pa_sprintf_malloc("/tmp/pulse-%s", u);
|
p = pa_sprintf_malloc("/tmp/pulse-%s", u);
|
||||||
|
|
||||||
if (stat(p, &st) < 0)
|
if (stat(p, &st) < 0) {
|
||||||
|
pa_xfree(p);
|
||||||
return NULL;
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
if (st.st_uid != getuid())
|
if (st.st_uid != getuid()) {
|
||||||
|
pa_xfree(p);
|
||||||
return NULL;
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
return p;
|
return p;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue