summaryrefslogtreecommitdiff
path: root/psi/iddict.h
diff options
context:
space:
mode:
authorRobin Watts <robin.watts@artifex.com>2018-09-05 18:07:40 +0100
committerRobin Watts <robin.watts@artifex.com>2018-09-05 19:20:15 +0100
commit2b533271d8bd915593a2f8e1a1f446ee940c7d76 (patch)
treeb15eb5abb50cdf3072fae00c098dab0b70b3b2fd /psi/iddict.h
parenta8c7899267121cb92503fe0f7e7f6ae433c386b1 (diff)
downloadghostpdl-2b533271d8bd915593a2f8e1a1f446ee940c7d76.tar.gz
Fix arg_copy leaks.
When handling -d or -s args, the code currently arg_copies the string it gets back, then uses that copied block to make postscript names from. Here we change the code so that postscript names are made in a slightly different way, so they copy the string content. This means we can free the arg_copied block afterwards, solving the leaks. While we are here, remove a layer of nasty variable hiding macros that do nothing but confuse things.
Diffstat (limited to 'psi/iddict.h')
-rw-r--r--psi/iddict.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/psi/iddict.h b/psi/iddict.h
index 67e6b887c..53d864b54 100644
--- a/psi/iddict.h
+++ b/psi/iddict.h
@@ -29,6 +29,8 @@
dict_put(pdref, key, pvalue, &idict_stack)
#define idict_put_string(pdref, kstr, pvalue)\
dict_put_string(pdref, kstr, pvalue, &idict_stack)
+#define idict_put_string_copy(pdref, kstr, pvalue)\
+ dict_put_string_copy(pdref, kstr, pvalue, &idict_stack)
#define idict_undef(pdref, key)\
dict_undef(pdref, key, &idict_stack)
#define idict_copy(dfrom, dto)\