1
0
mirror of https://gitlab.xiph.org/xiph/icecast-server.git synced 2024-09-22 04:15:54 -04:00

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.
This commit is contained in:
Marvin Scholz 2018-07-09 03:58:08 +02:00
parent 5cd32038d0
commit 0df3e0eda1

View File

@ -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)