summaryrefslogtreecommitdiff
path: root/main
diff options
context:
space:
mode:
authorfoobar <sniper@php.net>2005-01-09 16:30:09 (GMT)
committerfoobar <sniper@php.net>2005-01-09 16:30:09 (GMT)
commit6ffb0dcaf2f3dc1194522afe0c5af226bd757e31 (patch)
tree729e447880fa3e2e088e9bef8cb7aa54224f6637 /main
parent2da8b014affc2cf3c1ca2678cf42d58c1d3895f3 (diff)
downloadphp-6ffb0dcaf2f3dc1194522afe0c5af226bd757e31.tar.gz
- Fix leaks with registered shutdown functions.
Diffstat (limited to 'main')
-rw-r--r--main/main.c6
-rw-r--r--main/php_main.h3
2 files changed, 6 insertions, 3 deletions
diff --git a/main/main.c b/main/main.c
index 81952f1..66df888 100644
--- a/main/main.c
+++ b/main/main.c
@@ -1131,11 +1131,12 @@ void php_request_shutdown_for_hook(void *dummy)
{
TSRMLS_FETCH();
if (PG(modules_activated)) zend_try {
- php_call_shutdown_functions();
+ php_call_shutdown_functions(TSRMLS_C);
} zend_end_try();
if (PG(modules_activated)) {
zend_deactivate_modules(TSRMLS_C);
+ php_free_shutdown_functions(TSRMLS_C);
}
zend_try {
@@ -1191,11 +1192,12 @@ void php_request_shutdown(void *dummy)
} zend_end_try();
if (PG(modules_activated)) zend_try {
- php_call_shutdown_functions();
+ php_call_shutdown_functions(TSRMLS_C);
} zend_end_try();
if (PG(modules_activated)) {
zend_deactivate_modules(TSRMLS_C);
+ php_free_shutdown_functions(TSRMLS_C);
}
zend_try {
diff --git a/main/php_main.h b/main/php_main.h
index 01656e5..8839536 100644
--- a/main/php_main.h
+++ b/main/php_main.h
@@ -48,7 +48,8 @@ PHPAPI int php_handle_auth_data(const char *auth TSRMLS_DC);
PHPAPI void php_html_puts(const char *str, uint siz TSRMLS_DC);
-extern void php_call_shutdown_functions(void);
+extern void php_call_shutdown_functions(TSRMLS_D);
+extern void php_free_shutdown_functions(TSRMLS_D);
/* environment module */
extern int php_init_environ(void);