diff options
author | Robin Watts <Robin.Watts@artifex.com> | 2022-01-24 13:05:51 +0000 |
---|---|---|
committer | Robin Watts <Robin.Watts@artifex.com> | 2022-01-24 17:24:43 +0000 |
commit | 912eeab1c2ea0ee5351ff77b94a81cbc6c30b838 (patch) | |
tree | ee06ea6e651b39bbc6ede785581a1336884b931f /base/gximage1.c | |
parent | 26b3946ef8b6ba8e93f426830823e3493428ba5a (diff) | |
download | ghostpdl-912eeab1c2ea0ee5351ff77b94a81cbc6c30b838.tar.gz |
Fix SEGV while memory squeezing.
Commit e54754db42 changed gx_image_enum_begin to free penum
on failure. Accordingly callers should not free it again.
Seen while revisiting memory squeezing owl.pcl:
MEMENTO_FAILAT=12557 gpcl6 -sDEVICE=ppmraw -o /dev/null pcl/examples/owl.pcl
Diffstat (limited to 'base/gximage1.c')
-rw-r--r-- | base/gximage1.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/base/gximage1.c b/base/gximage1.c index ddd2ef0ea..48d879e0d 100644 --- a/base/gximage1.c +++ b/base/gximage1.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2001-2021 Artifex Software, Inc. +/* Copyright (C) 2001-2022 Artifex Software, Inc. All Rights Reserved. This software is provided AS-IS with no warranty, either express or @@ -96,6 +96,7 @@ gx_begin_image1(gx_device * dev, if (code >= 0) *pinfo = (gx_image_enum_common_t *)penum; else { + /* penum is freed in by gx_image_enum_begin */ *pinfo = NULL; } return code; |