diff options
author | Julian Smith <jules@op59.net> | 2020-05-27 11:50:08 +0100 |
---|---|---|
committer | Julian Smith <jules@op59.net> | 2020-05-29 17:17:08 +0100 |
commit | a608d40b2d6d4a062857e23060c243a4b10aac69 (patch) | |
tree | 905c36130dfefeae17b7592ef7f26f269bc4036f | |
parent | be333874ffd55024ce640bf8d4347dabff162be1 (diff) | |
download | ghostpdl-a608d40b2d6d4a062857e23060c243a4b10aac69.tar.gz |
Hacky fix for Memento leak in pcl_execute_macro().
Fixes the six remaining leaks after prev commit in:
MEMENTO_FAILAT=15796 ./ghostpdl/membin/gpcl6 -sDEVICE=pbmraw -o /dev/null tests_private/pcl/pcl5cfts/fts.2180
-rw-r--r-- | pcl/pcl/pcmacros.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/pcl/pcl/pcmacros.c b/pcl/pcl/pcmacros.c index 640db63b8..35a28ec40 100644 --- a/pcl/pcl/pcmacros.c +++ b/pcl/pcl/pcmacros.c @@ -79,7 +79,7 @@ pcl_execute_macro(const pcl_macro_t * pmac, pcl_state_t * pcs, if (reset) { code = pcl_do_resets(pcs, reset); if (code < 0) - return code; + goto check_after; } state.definitions = pcs->pcl_commands; state.hpgl_parser_state = &gstate; @@ -91,6 +91,7 @@ pcl_execute_macro(const pcl_macro_t * pmac, pcl_state_t * pcs, pcs->macro_level++; code = pcl_process(&state, pcs, &r); pcs->macro_level--; + check_after: if (after) { int errcode = do_copies(&saved, pcs, after); if (errcode < 0) |