This commit is contained in:
krakjoe 2013-11-10 11:35:59 +00:00
parent 6df19b3aa2
commit b978c20f63
5 changed files with 92 additions and 18 deletions

View file

@ -22,6 +22,7 @@ ZEND_DECLARE_MODULE_GLOBALS(phpdbg);
static inline void php_phpdbg_globals_ctor(zend_phpdbg_globals *pg) {
pg->exec = NULL;
pg->ops = NULL;
}
static PHP_MINIT_FUNCTION(phpdbg) {
@ -42,9 +43,15 @@ static PHP_RINIT_FUNCTION(phpdbg) {
static PHP_RSHUTDOWN_FUNCTION(phpdbg) {
zend_hash_destroy(&PHPDBG_G(breaks));
if (PHPDBG_G(exec)) {
efree(PHPDBG_G(exec));
}
if (PHPDBG_G(ops)) {
destroy_op_array(PHPDBG_G(ops) TSRMLS_CC);
efree(PHPDBG_G(ops));
}
}
static zend_module_entry sapi_phpdbg_module_entry = {