[gs-commits] ghostpdl branch, master, updated. jbig2dec-0.14-1659-gbe793aa
[email protected] (Shailesh Mistry)
| Newsgroups | gmane.comp.printing.ghostscript.cvs |
|---|---|
| Message-ID | <[email protected]> |
The ghostpdl branch, master has been updated
via be793aa94180e06135fd7fec36b6f6ab9ab67519 (commit)
from 08c1e576fc09fcc7fdf5cd935d91fdfea1e7f0f9 (commit)
----------------------------------------------------------------------
commit be793aa94180e06135fd7fec36b6f6ab9ab67519
Author: Shailesh Mistry <[email protected]>
Date: Tue Sep 10 20:26:38 2019 +0100
Bug 697545 : Prevent memory leaks in gx_image_enum_begin.
Prevent memory leaks on error and then later releasing graphic state.
Error created using :-
MEMENTO_FAILAT=15242 ./membin/gpcl6 -sDEVICE=pbmraw -o /dev/null ./tests_private/pcl/pcl5cfts/fts.0720
diff --git a/base/gxipixel.c b/base/gxipixel.c
index 7534f81..0ce4f9e 100644
--- a/base/gxipixel.c
+++ b/base/gxipixel.c
@@ -970,7 +970,7 @@ gx_image_enum_begin(gx_device * dev, const gs_gstate * pgs,
code = gx_alloc_rop_texture_device(&rtdev, mem,
"image RasterOp");
if (code < 0)
- return code;
+ goto fail;
/* The 'target' must not be NULL for gx_make_rop_texture_device */
if (!penum->clip_dev && !dev)
return_error(gs_error_undefined);
diff --git a/pcl/pcl/pcparse.c b/pcl/pcl/pcparse.c
index e319aae..68ef78a 100644
--- a/pcl/pcl/pcparse.c
+++ b/pcl/pcl/pcparse.c
@@ -482,6 +482,7 @@ pcl_process(pcl_parser_state_t * pst, pcl_state_t * pcs,
if (pst->args.data == 0) {
--p;
code = gs_note_error(e_Memory);
+ (void)pcl_grestore(pcs);
goto x;
}
pst->args.data_on_heap = true;
Summary of changes:
base/gxipixel.c | 2 +-
pcl/pcl/pcparse.c | 1 +
2 files changed, 2 insertions(+), 1 deletion(-)