diff options
author | Norbert Preining <norbert@preining.info> | 2020-07-08 03:01:45 +0000 |
---|---|---|
committer | Norbert Preining <norbert@preining.info> | 2020-07-08 03:01:45 +0000 |
commit | 8c3fedd243b69349b426144e5e2b94ef4aea6a4c (patch) | |
tree | f5842753f11a90141f3cc2e356c3a04766e8d81e /graphics/asymptote/runfile.in | |
parent | ef87f13c4503a2aa4a9098cbf33e0bfcad19008e (diff) |
CTAN sync 202007080301
Diffstat (limited to 'graphics/asymptote/runfile.in')
-rw-r--r-- | graphics/asymptote/runfile.in | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/graphics/asymptote/runfile.in b/graphics/asymptote/runfile.in index d9186eee6d..39eb464c28 100644 --- a/graphics/asymptote/runfile.in +++ b/graphics/asymptote/runfile.in @@ -348,15 +348,17 @@ Int rename(string from, string to) return rc; } -// Create a unique temporary file name. +// Create a uniquely named temporary file. string mktemp(string s) { - char *S=Strdup(s+"XXXXXX"); + char *S=StrdupMalloc(s+"XXXXXX"); int fd=mkstemp(S); if(fd < 0) { ostringstream buf; buf << "Could not create unique temporary filename based on " << s; error(buf); } - return S; + string T(S); + free(S); + return T; } |