diff options
author | Robin Watts <Robin.Watts@artifex.com> | 2022-01-28 14:36:58 +0000 |
---|---|---|
committer | Robin Watts <Robin.Watts@artifex.com> | 2022-02-03 12:26:26 +0000 |
commit | 2cceccaa487f3c38e53fb6d3eee3a84f5a0e57b8 (patch) | |
tree | f410da660397e809ecfc82d59ba6ea824cd1c432 /pcl | |
parent | c3936cc2beaba5eeb689e639d462f8262dfcba80 (diff) | |
download | ghostpdl-2cceccaa487f3c38e53fb6d3eee3a84f5a0e57b8.tar.gz |
Fix memory leak.
When running a windows memento, 32bit build of:
gpcl6 -dNOPAUSE -dBATCH -sDEVICE=ppmraw -dMaxBitmap=1000 -r300
-o gpcl6.out ../tests_private/pcl/pcl5cats/*.BIN
we'd see leaks from pl_bitmap_build_char. I could not reproduce
these when running individual files.
A desk-check of the code spotted that penum would not be freed if
a particular error path was taken. Fixing that (as here), removes
the leaks.
Diffstat (limited to 'pcl')
-rw-r--r-- | pcl/pl/plchar.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/pcl/pl/plchar.c b/pcl/pl/plchar.c index cccd3bf64..022ad8506 100644 --- a/pcl/pl/plchar.c +++ b/pcl/pl/plchar.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 @@ -466,7 +466,7 @@ pl_bitmap_build_char(gs_show_enum * penum, gs_gstate * pgs, gs_font * pfont, code = gs_setcachedevice(penum, pgs, m); } if (code < 0) - return code; + goto out; #ifdef DEBUG if (gs_debug_c('B')) { int i; |