summaryrefslogtreecommitdiffstats
path: root/src/io/streamtest.cpp
diff options
context:
space:
mode:
authorAndrew Higginson <at.higginson@gmail.com>2011-12-27 21:04:47 +0000
committerAndrew <at.higginson@gmail.com>2011-12-27 21:04:47 +0000
commit80960b623a99aae1402ab651b2974ef544ed3b03 (patch)
treeba49d42c2789e9e11f805e2d5263e10f9fedeef8 /src/io/streamtest.cpp
parenttry to fix bug (diff)
parentGDL: Cherry-pick upstream patch 73852 (2011-03-23) - Add missing return value. (diff)
downloadinkscape-80960b623a99aae1402ab651b2974ef544ed3b03.tar.gz
inkscape-80960b623a99aae1402ab651b2974ef544ed3b03.zip
merged with trunk so I can build again...
(bzr r10092.1.36)
Diffstat (limited to 'src/io/streamtest.cpp')
-rw-r--r--src/io/streamtest.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/io/streamtest.cpp b/src/io/streamtest.cpp
index b25ef43f0..2030e6a85 100644
--- a/src/io/streamtest.cpp
+++ b/src/io/streamtest.cpp
@@ -219,13 +219,15 @@ int main(int argc, char **argv)
// create temp files somewhere else instead of current dir
// TODO: clean them up too
char * testpath = strdup("/tmp/streamtest-XXXXXX");
- testpath = mkdtemp(testpath);
- if (!testpath)
+ char * testpath2;
+ testpath2 = mkdtemp(testpath);
+ free(testpath);
+ if (!testpath2)
{
perror("mkdtemp");
return 1;
}
- if (chdir(testpath))
+ if (chdir(testpath2))
{
perror("chdir");
return 1;