diff options
author | Shailesh Mistry <shailesh.mistry@hotmail.co.uk> | 2018-03-27 20:13:18 +0100 |
---|---|---|
committer | Shailesh Mistry <shailesh.mistry@hotmail.co.uk> | 2018-03-29 18:45:11 +0100 |
commit | 344db7fb39f457201f243b2775e3d63cf8406010 (patch) | |
tree | 11a300e864f40d5a86f7edf17220220e0f5b33e7 /base/gxchar.c | |
parent | 0f6ec1c44bb38175344be16d747b8feee35ae35f (diff) | |
download | ghostpdl-344db7fb39f457201f243b2775e3d63cf8406010.tar.gz |
Bug 697545 : Update functions to return error codes.
Prevent numerous SEGV points by ensuring error codes are returned and
handled appropriately.
Diffstat (limited to 'base/gxchar.c')
-rw-r--r-- | base/gxchar.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/base/gxchar.c b/base/gxchar.c index a9f36abcb..2070060b5 100644 --- a/base/gxchar.c +++ b/base/gxchar.c @@ -1554,6 +1554,12 @@ show_cache_setup(gs_show_enum * penum) "show_cache_setup(dev_cache2)"); if (dev == 0 || dev2 == 0) { + /* + * The structure is full of garbage so must not call the + * finalize method but still need to free the structure + */ + gs_set_object_type(mem, dev2, NULL); + gs_set_object_type(mem, dev, NULL); gs_free_object(mem, dev2, "show_cache_setup(dev_cache2)"); gs_free_object(mem, dev, "show_cache_setup(dev_cache)"); return_error(gs_error_VMerror); |