Commit 0df3e0ed by Marvin Scholz

Fix: Correct clearing of XSLT cache entry

Fix a double free that could happen when the cache was cleared
during config reload and then subsequent XSLT requests would try
to evict the same cache item, because the item name was not set to
NULL in clear_cache_entry.

Previously this was no problem as a cache entry would only be evicted
on load of a new XSLT and that one would immediately fill in the place
of the old one.
parent 5cd32038
Pipeline #252 failed with stage
in 11 seconds
......@@ -129,6 +129,7 @@ static void clear_cache_entry(size_t idx) {
free(cache[idx].filename);
if (cache[idx].stylesheet)
xsltFreeStylesheet(cache[idx].stylesheet);
cache[idx].filename = NULL;
}
void xslt_clear_cache(void)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment