Skip to content

Commit 70b2664

Browse files
authored
Fix memory error on shutdown (PHP-8.1) (swoole#4325)
Ref of function_name was held by zend_fcall_info_init().
1 parent db6deb0 commit 70b2664

File tree

1 file changed

+0
-1
lines changed

1 file changed

+0
-1
lines changed

ext-src/php_swoole.cc

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -306,7 +306,6 @@ void php_swoole_register_shutdown_function(const char *function) {
306306
zend_fcall_info_init(
307307
&function_name, 0, &shutdown_function_entry.fci, &shutdown_function_entry.fci_cache, NULL, NULL);
308308
register_user_shutdown_function(Z_STRVAL(function_name), Z_STRLEN(function_name), &shutdown_function_entry);
309-
zval_ptr_dtor(&function_name);
310309
#else
311310
zval *function_name;
312311
#if PHP_VERSION_ID >= 80000

0 commit comments

Comments
 (0)