diff options
author | Chris Liddell <chris.liddell@artifex.com> | 2020-06-29 13:15:35 +0100 |
---|---|---|
committer | Chris Liddell <chris.liddell@artifex.com> | 2020-06-29 14:23:19 +0100 |
commit | 95e5e879c3a3fea42a97e942b53a6914ed7ccfc2 (patch) | |
tree | 8c58463af79d05c18e1026591fcd49b80f567ec7 /psi/zgstate.c | |
parent | ea7818b8bb62b1df4f81e4dc752ccda54cc3d59c (diff) | |
download | ghostpdl-95e5e879c3a3fea42a97e942b53a6914ed7ccfc2.tar.gz |
int_gstate_alloc() error handling
If we fail to allocate even the graphics libaray graphics state, bail out
immediately.
Diffstat (limited to 'psi/zgstate.c')
-rw-r--r-- | psi/zgstate.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/psi/zgstate.c b/psi/zgstate.c index e4ff2331b..e4c014df4 100644 --- a/psi/zgstate.c +++ b/psi/zgstate.c @@ -125,6 +125,9 @@ int_gstate_alloc(const gs_dual_memory_t * dmem) gs_ref_memory_t *gmem = dmem->space_global; gs_gstate *pgs = gs_gstate_alloc((gs_memory_t *)lmem); + if (pgs == NULL) + return NULL; + iigs = gs_alloc_struct((gs_memory_t *)lmem, int_gstate, &st_int_gstate, "int_gstate_alloc(int_gstate)"); if (iigs == NULL) |