mirror of
https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
synced 2025-11-04 13:29:59 -05:00
Under win32 we freed the wrong pointer causing a segmentation fault.
git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@455 fefdeb5f-60dc-0310-8127-8f9354f1896f
This commit is contained in:
parent
cb2a7ed028
commit
262c60fcaa
1 changed files with 4 additions and 4 deletions
|
|
@ -965,19 +965,19 @@ FILE *pa_open_config_file(const char *global, const char *local, const char *env
|
|||
FILE *f;
|
||||
char *lfn;
|
||||
|
||||
lfn = pa_sprintf_malloc("%s/%s", h, local);
|
||||
fn = lfn = pa_sprintf_malloc("%s/%s", h, local);
|
||||
|
||||
#ifdef OS_IS_WIN32
|
||||
if (!ExpandEnvironmentStrings(lfn, buf, PATH_MAX))
|
||||
return NULL;
|
||||
lfn = buf;
|
||||
fn = buf;
|
||||
#endif
|
||||
|
||||
f = fopen(lfn, "r");
|
||||
f = fopen(fn, "r");
|
||||
|
||||
if (f || errno != ENOENT) {
|
||||
if (result)
|
||||
*result = pa_xstrdup(lfn);
|
||||
*result = pa_xstrdup(fn);
|
||||
pa_xfree(lfn);
|
||||
return f;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue