summaryrefslogtreecommitdiffstats
path: root/polyp
diff options
context:
space:
mode:
authorPierre Ossman <ossman@cendio.se>2006-01-12 17:12:44 +0000
committerPierre Ossman <ossman@cendio.se>2006-01-12 17:12:44 +0000
commit262c60fcaaa8c0edb6515d2f57bbe41af360ffef (patch)
treee4bc6af8d3f9950c840b5afb61f221e24e0f372a /polyp
parentcb2a7ed02840c076f8b53023658920ea8d12d849 (diff)
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
Diffstat (limited to 'polyp')
-rw-r--r--polyp/util.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/polyp/util.c b/polyp/util.c
index f9098704..4b6edb97 100644
--- a/polyp/util.c
+++ b/polyp/util.c
@@ -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;
}