[gs-cvs] rev 8704 - trunk/gs/src
ray at ghostscript.com
ray at ghostscript.com
Mon May 5 12:51:17 PDT 2008
Author: ray
Date: 2008-05-05 12:51:17 -0700 (Mon, 05 May 2008)
New Revision: 8704
Modified:
trunk/gs/src/gdevp14.c
Log:
Eliminate leaks caused by lost 'maskbuf' elements. Only the uppermost
maskbuf is (currently) used by the pop_transparency_group that applies
the mask, but the chain of maskbuf->maskbuf elements was never freed.
This also improves performance (at least for the test case of bug
689534). Customer #870.
Modified: trunk/gs/src/gdevp14.c
===================================================================
--- trunk/gs/src/gdevp14.c 2008-05-05 18:27:06 UTC (rev 8703)
+++ trunk/gs/src/gdevp14.c 2008-05-05 19:51:17 UTC (rev 8704)
@@ -1014,6 +1014,11 @@
if_debug1('v', "[v]pdf14_pop_transparency_mask, idle=%d\n", tos->idle);
ctx->stack = tos->saved;
+ if (tos->maskbuf) {
+ /* The maskbuf of the ctx->maskbuf entry is never used, free it now */
+ pdf14_buf_free(tos->maskbuf, ctx->memory);
+ tos->maskbuf = NULL;
+ }
ctx->maskbuf = tos;
return 0;
}
More information about the gs-cvs
mailing list