summaryrefslogtreecommitdiff
path: root/src/snuffleupagus.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/snuffleupagus.c')
-rw-r--r--src/snuffleupagus.c16
1 files changed, 13 insertions, 3 deletions
diff --git a/src/snuffleupagus.c b/src/snuffleupagus.c
index 2cc31d8..7db6c93 100644
--- a/src/snuffleupagus.c
+++ b/src/snuffleupagus.c
@@ -3,6 +3,7 @@
3#endif 3#endif
4 4
5#include "php_snuffleupagus.h" 5#include "php_snuffleupagus.h"
6#include "sp_config.h"
6 7
7#ifndef ZEND_EXT_API 8#ifndef ZEND_EXT_API
8#define ZEND_EXT_API ZEND_DLEXPORT 9#define ZEND_EXT_API ZEND_DLEXPORT
@@ -118,11 +119,20 @@ PHP_MSHUTDOWN_FUNCTION(snuffleupagus) {
118 pefree(SNUFFLEUPAGUS_G(config.config_upload_validation), 1); 119 pefree(SNUFFLEUPAGUS_G(config.config_upload_validation), 1);
119 pefree(SNUFFLEUPAGUS_G(config.config_cookie_encryption), 1); 120 pefree(SNUFFLEUPAGUS_G(config.config_cookie_encryption), 1);
120 121
121 sp_list_free(SNUFFLEUPAGUS_G(config.config_disabled_functions->disabled_functions)); 122 sp_node_t* disabled_functions = SNUFFLEUPAGUS_G(config.config_disabled_functions->disabled_functions);
123 sp_node_t* disabled_functions_ret = SNUFFLEUPAGUS_G(config.config_disabled_functions_ret->disabled_functions);
124 sp_node_t* disabled_constructs = SNUFFLEUPAGUS_G(config.config_disabled_constructs->construct_include);
125
126 // Free the list of disabled functions for each `sp_disabled_function` instance
127 sp_disabled_function_list_free(disabled_functions);
128 sp_disabled_function_list_free(disabled_functions_ret);
129 sp_disabled_function_list_free(disabled_constructs);
130
131 sp_list_free(disabled_functions);
122 pefree(SNUFFLEUPAGUS_G(config.config_disabled_functions), 1); 132 pefree(SNUFFLEUPAGUS_G(config.config_disabled_functions), 1);
123 sp_list_free(SNUFFLEUPAGUS_G(config.config_disabled_functions_ret->disabled_functions)); 133 sp_list_free(disabled_functions_ret);
124 pefree(SNUFFLEUPAGUS_G(config.config_disabled_functions_ret), 1); 134 pefree(SNUFFLEUPAGUS_G(config.config_disabled_functions_ret), 1);
125 sp_list_free(SNUFFLEUPAGUS_G(config.config_disabled_constructs->construct_include)); 135 sp_list_free(disabled_constructs);
126 pefree(SNUFFLEUPAGUS_G(config.config_disabled_constructs), 1); 136 pefree(SNUFFLEUPAGUS_G(config.config_disabled_constructs), 1);
127 137
128 UNREGISTER_INI_ENTRIES(); 138 UNREGISTER_INI_ENTRIES();