summaryrefslogtreecommitdiff
path: root/xps
diff options
context:
space:
mode:
authorJulian Smith <jules@op59.net>2020-02-10 12:21:24 +0000
committerJulian Smith <jules@op59.net>2020-02-10 14:54:36 +0000
commit691d2e37fc9f06bf6fb0ed009a880f4d40a86f48 (patch)
tree7677bd8ffc986f3d5091479b81a53480267d3950 /xps
parent450eb91a0af4901b1f9a259cc69d8976113cbadb (diff)
downloadghostpdl-691d2e37fc9f06bf6fb0ed009a880f4d40a86f48.tar.gz
Fixed leak on error in xps_impl_allocate_interp_instance() (found by memento).
Fixes: MEMENTO_FAILAT=1938 LD_LIBRARY_PATH=../libbacktrace/.libs ./membin/gpdl -sDEVICE=bit -o /dev/null examples/tiger.eps
Diffstat (limited to 'xps')
-rw-r--r--xps/xpstop.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/xps/xpstop.c b/xps/xpstop.c
index fb73328a9..968a81837 100644
--- a/xps/xpstop.c
+++ b/xps/xpstop.c
@@ -175,6 +175,10 @@ xps_impl_allocate_interp_instance(pl_interp_implementation_t *impl,
}
if (ctx) {
assert(!ctx->fontdir);
+ rc_decrement(ctx->gray_lin, "gs_cspace_new_ICC");
+ rc_decrement(ctx->gray, "gs_cspace_new_ICC");
+ rc_decrement(ctx->cmyk, "gs_cspace_new_ICC");
+ rc_decrement(ctx->srgb, "gs_cspace_new_ICC");
gs_free_object(pmem, ctx, "xps_impl_allocate_interp_instance");
}
if (pgs) {