diff options
author | Robin Watts <Robin.Watts@artifex.com> | 2021-05-06 18:02:53 +0100 |
---|---|---|
committer | Robin Watts <Robin.Watts@artifex.com> | 2021-05-07 16:09:39 +0100 |
commit | 73f4ab96ef4507c76ae07a364717bdced634a925 (patch) | |
tree | 7df612d925dfc4c4203aaeee1585b668ffedd04d /base/gscsepr.c | |
parent | 5ca7525c42cf2481802cafa817b42ecdd41cf1e9 (diff) | |
download | ghostpdl-73f4ab96ef4507c76ae07a364717bdced634a925.tar.gz |
Update colorspace finalizers.
GS finalizers must be idempotent, as they can be called several
times on the same block. Accordingly, update both the generic
colorspace finalizer, and the type specific ones.
In order for the type specific ones to be idempotent, change
away from using a const pointer (which avoids a few nasty
'cast away const' cases too).
Diffstat (limited to 'base/gscsepr.c')
-rw-r--r-- | base/gscsepr.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/base/gscsepr.c b/base/gscsepr.c index 341189885..0e6544fa1 100644 --- a/base/gscsepr.c +++ b/base/gscsepr.c @@ -210,11 +210,13 @@ gx_set_overprint_Separation(const gs_color_space * pcs, gs_gstate * pgs) /* Finalize contents of a Separation color space. */ static void -gx_final_Separation(const gs_color_space * pcs) +gx_final_Separation(gs_color_space * pcs) { rc_adjust_const(pcs->params.separation.map, -1, "gx_adjust_Separation"); + pcs->params.separation.map = NULL; gs_free_object(pcs->params.separation.mem, pcs->params.separation.sep_name, "gx_final_Separation"); + pcs->params.separation.sep_name = NULL; } /* ------ Constructors/accessors ------ */ |