Commit 2f938b85 authored by Philipp Schafft's avatar Philipp Schafft 🦁

Fix: set freed pointer to NULL to avoid access-after-free

parent e900d8e8
Pipeline #269 failed with stage
in 12 seconds
......@@ -127,9 +127,10 @@ void xslt_shutdown(void) {
static void clear_cache_entry(size_t idx) {
free(cache[idx].filename);
cache[idx].filename = NULL;
if (cache[idx].stylesheet)
xsltFreeStylesheet(cache[idx].stylesheet);
cache[idx].filename = NULL;
cache[idx].stylesheet = 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