summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Liddell <chris.liddell@artifex.com>2019-04-19 08:16:57 +0100
committerChris Liddell <chris.liddell@artifex.com>2019-04-19 09:46:00 +0100
commitd8db95fb00af2fb543439242d3ac122aead88c94 (patch)
tree0ef5e7491e2b408f80b56f0fc99f095aed0e8d5e
parentb399f849ce1aa391da1abeb23fd32e376b56e522 (diff)
downloadghostpdl-d8db95fb00af2fb543439242d3ac122aead88c94.tar.gz
Fix some structure element name confusion in base/sjbig2_luratech.c
A previous commit slightly modified some of memory management for jbig2 global data. In mirroring those changes to the Luratech version of the code, a couple of places were left with the structure element names from the jbig2dec version.
-rw-r--r--base/sjbig2_luratech.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/base/sjbig2_luratech.c b/base/sjbig2_luratech.c
index 7deae9acb..f8a78157b 100644
--- a/base/sjbig2_luratech.c
+++ b/base/sjbig2_luratech.c
@@ -66,7 +66,8 @@ s_jbig2decode_make_global_data(gs_memory_t *mem, byte *data, uint size, void **r
{
s_jbig2decode_global_data *global = NULL;
- global = gs_alloc_bytes(mem, sizeof (*global), "s_jbig2decode_make_global_data(global)");
+ global = (s_jbig2decode_global_data *)gs_alloc_bytes(mem, sizeof (*global),
+ "s_jbig2decode_make_global_data(global)");
if (global == NULL) return_error(gs_error_VMerror);
global->mem = mem;
@@ -392,9 +393,10 @@ s_jbig2decode_release(stream_state *ss)
/* the interpreter calls jbig2decode_free_global_data() separately */
} else {
/* We are responsible for freeing global context */
- if (state->global_ctx) {
- s_jbig2decode_free_global_data(state->global_ctx);
- state->global_ctx = NULL;
+ if (state->global_data) {
+ s_jbig2decode_free_global_data(state->global_data);
+ state->global_data = NULL;
+ state->global_size = 0;
}
}
}