diff options
author | Henry Stiles <henry.stiles@artifex.com> | 2008-08-02 21:09:12 +0000 |
---|---|---|
committer | Henry Stiles <henry.stiles@artifex.com> | 2008-08-02 21:09:12 +0000 |
commit | f22a9d62e53400923f79a023b9722383e4737c12 (patch) | |
tree | 3fd3eff6b6ca30520f1c20b6a50bf7fd3ef84421 /pcl/pctop.c | |
parent | 23b75b8e68bbfab36743e738dda1aef0296e2794 (diff) |
Cleanup logical errors which could result in a null dereference. In
fact if any of the affected allocations failed the system would not
function properly, so the change is mostly cosmetic.
git-svn-id: http://svn.ghostscript.com/ghostscript/trunk@8924 a1074d23-0009-0410-80fe-cf8c14f379e6
Diffstat (limited to 'pcl/pctop.c')
-rw-r--r-- | pcl/pctop.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/pcl/pctop.c b/pcl/pctop.c index ebb82643d..48184f4e5 100644 --- a/pcl/pctop.c +++ b/pcl/pctop.c @@ -245,11 +245,10 @@ pcl_impl_allocate_interp_instance( ); gs_state *pgs = gs_state_alloc(mem); /* If allocation error, deallocate & return */ - /* HS freeing null, perhaps if one of these is null the others should be freed. Was that the intent? */ if (!pcli || !pgs) { - if (!pcli) + if (pcli) gs_free_object(mem, pcli, "pcl_allocate_interp_instance(pcl_interp_instance_t)"); - if (!pgs) + if (pgs) gs_state_free(pgs); return gs_error_VMerror; } |