diff options
Diffstat (limited to 'ext/session/mod_user.c')
-rw-r--r-- | ext/session/mod_user.c | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/ext/session/mod_user.c b/ext/session/mod_user.c index 2ff5302f78..84a28d3427 100644 --- a/ext/session/mod_user.c +++ b/ext/session/mod_user.c @@ -63,7 +63,7 @@ static zval *ps_call_handler(zval *func, int argc, zval **argv TSRMLS_DC) } #define STDVARS \ - zval *retval; \ + zval *retval = NULL; \ int ret = FAILURE #define PSF(a) PS(mod_user_names).name.ps_##a @@ -99,6 +99,7 @@ PS_OPEN_FUNC(user) PS_CLOSE_FUNC(user) { + zend_bool bailout = 0; STDVARS; if (!PS(mod_user_implemented)) { @@ -106,9 +107,21 @@ PS_CLOSE_FUNC(user) return SUCCESS; } - retval = ps_call_handler(PSF(close), 0, NULL TSRMLS_CC); + zend_try { + retval = ps_call_handler(PSF(close), 0, NULL TSRMLS_CC); + } zend_catch { + bailout = 1; + } zend_end_try(); + PS(mod_user_implemented) = 0; + if (bailout) { + if (retval) { + zval_ptr_dtor(&retval); + } + zend_bailout(); + } + FINISH; } |