summaryrefslogtreecommitdiff
path: root/base/gsicc_cache.c
diff options
context:
space:
mode:
authorShailesh Mistry <shailesh.mistry@hotmail.co.uk>2018-04-03 00:13:16 +0100
committerShailesh Mistry <shailesh.mistry@hotmail.co.uk>2018-04-03 16:56:43 +0100
commit7891eda84b33aef5ee7540b3b3d04477e3602a3d (patch)
treee758d3bf0e7ce0b35a59d418d9bbba0313f2174c /base/gsicc_cache.c
parentf0e234d660dbeb774f39392f0e45e333fd9308a3 (diff)
downloadghostpdl-7891eda84b33aef5ee7540b3b3d04477e3602a3d.tar.gz
Prevent SEGV in memento squeeze builds.
Remove leftover variables from commit 9ff6b34e461fcbd4e. Added conditional compilation to prevent SEGV from thread code.
Diffstat (limited to 'base/gsicc_cache.c')
-rw-r--r--base/gsicc_cache.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/base/gsicc_cache.c b/base/gsicc_cache.c
index 5073717cd..110347b28 100644
--- a/base/gsicc_cache.c
+++ b/base/gsicc_cache.c
@@ -106,7 +106,6 @@ gsicc_cache_new(gs_memory_t *memory)
return(NULL);
#ifdef MEMENTO_SQUEEZE_BUILD
result->lock = NULL;
- result->wait = NULL;
#else
result->lock = gx_monitor_label(gx_monitor_alloc(memory->stable_memory),
"gsicc_cache_new");
@@ -262,9 +261,7 @@ gsicc_alloc_link(gs_memory_t *memory, gsicc_hashlink_t hashcode)
"gsicc_alloc_link");
if (result == NULL)
return NULL;
-#ifdef MEMENTO_SQUEEZE_BUILD
- result->wait = NULL;
-#else
+#ifndef MEMENTO_SQUEEZE_BUILD
result->lock = gx_monitor_label(gx_monitor_alloc(memory->stable_memory),
"gsicc_link_new");
if (result->lock == NULL) {
@@ -1260,7 +1257,9 @@ gsicc_get_link_profile(const gs_gstate *pgs, gx_device *dev,
/* This could result in an infinite loop if other threads are waiting */
/* for it to be made valid. (see gsicc_findcachelink). */
link->ref_count--; /* this thread no longer using this link entry */
+#ifndef MEMENTO_SQUEEZE_BUILD
gx_monitor_leave(link->lock);
+#endif
gsicc_remove_link(link, cache_mem);
return NULL;
}