mirror of
https://gitlab.xiph.org/xiph/icecast-server.git
synced 2025-01-03 14:56:34 -05: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:
parent
5cd32038d0
commit
0df3e0eda1
@ -129,6 +129,7 @@ static void clear_cache_entry(size_t idx) {
|
|||||||
free(cache[idx].filename);
|
free(cache[idx].filename);
|
||||||
if (cache[idx].stylesheet)
|
if (cache[idx].stylesheet)
|
||||||
xsltFreeStylesheet(cache[idx].stylesheet);
|
xsltFreeStylesheet(cache[idx].stylesheet);
|
||||||
|
cache[idx].filename = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
void xslt_clear_cache(void)
|
void xslt_clear_cache(void)
|
||||||
|
Loading…
Reference in New Issue
Block a user