summaryrefslogtreecommitdiff
path: root/contrib
diff options
context:
space:
mode:
authorRobin Watts <Robin.Watts@artifex.com>2021-04-08 14:29:44 +0100
committerRobin Watts <Robin.Watts@artifex.com>2021-04-08 15:53:54 +0100
commit8494df92c31f0f496d28f17fa5d8339ed3c2361d (patch)
treeffb043f44904ec912eff7b5aa90348e9b0c810a1 /contrib
parentd0440b33c132692654dab2fc74cc8024e39f95a5 (diff)
downloadghostpdl-8494df92c31f0f496d28f17fa5d8339ed3c2361d.tar.gz
Fix gdevescv.c operation with Memento.
gdevescv.c used strdup, which wasn't previously caught by Memento. Accordingly it was careful to release the memory using 'unvectored_free' (i.e. free before Memento got involved). Now that Memento has been updated to catch strdup this is not required (and indeed causes problems). Accordingly, simplify the code.
Diffstat (limited to 'contrib')
-rw-r--r--contrib/eplaser/gdevescv.c10
1 files changed, 1 insertions, 9 deletions
diff --git a/contrib/eplaser/gdevescv.c b/contrib/eplaser/gdevescv.c
index c7bd29e18..45bc13754 100644
--- a/contrib/eplaser/gdevescv.c
+++ b/contrib/eplaser/gdevescv.c
@@ -35,13 +35,6 @@
#include <stdlib.h> /* for abs() and free */
-/* Get this definition in before we read memento.h */
-static void
-unvectored_free(void *x)
-{
- free(x);
-}
-
#if ( 6 > GS_VERSION_MAJOR )
#include <string.h>
@@ -1032,8 +1025,7 @@ escv_beginpage(gx_device_vector * vdev)
if (sysname)
{
lputs(s, sysname );
- /* Carefully avoid memento interfering here. */
- unvectored_free(sysname);
+ free(sysname);
sysname = NULL;
}
}