Skip to content

Commit 7fec72c

Browse files
committed
Fix GH-21600: Remove xsltCleanupGlobals call in ext/xsl MSHUTDOWN.
The call to xsltCleanupGlobals() during module shutdown can cause a segfault in xmlHashFree() when freeing libxslt internal hash tables. This is the same class of shutdown cleanup issue that led to xmlCleanupParser() being removed from ext/libxml. The process is about to exit and the OS will reclaim all memory, making the explicit cleanup both unnecessary and harmful.
1 parent 9f33bff commit 7fec72c

File tree

1 file changed

+0
-1
lines changed

1 file changed

+0
-1
lines changed

ext/xsl/php_xsl.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -323,7 +323,6 @@ PHP_MSHUTDOWN_FUNCTION(xsl)
323323
xsltUnregisterExtModuleFunction ((const xmlChar *) "function",
324324
(const xmlChar *) "http://php.net/xsl");
325325
xsltSetGenericErrorFunc(NULL, NULL);
326-
xsltCleanupGlobals();
327326

328327
return SUCCESS;
329328
}

0 commit comments

Comments
 (0)