Skip to content

Commit d3ad2d7

Browse files
committed
Merge branch 'PHP-5.4'
2 parents bb5417b + da3660a commit d3ad2d7

File tree

1 file changed

+15
-1
lines changed

1 file changed

+15
-1
lines changed

ext/session/mod_user.c

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,16 +99,30 @@ PS_OPEN_FUNC(user)
9999

100100
PS_CLOSE_FUNC(user)
101101
{
102+
zend_bool bailout = 0;
102103
STDVARS;
103104

104105
if (!PS(mod_user_implemented)) {
105106
/* already closed */
106107
return SUCCESS;
107108
}
108109

109-
retval = ps_call_handler(PSF(close), 0, NULL TSRMLS_CC);
110+
zend_try {
111+
retval = ps_call_handler(PSF(close), 0, NULL TSRMLS_CC);
112+
} zend_catch {
113+
bailout = 1;
114+
PS(mod_user_implemented) = 0;
115+
} zend_end_try();
116+
110117
PS(mod_user_implemented) = 0;
111118

119+
if (bailout) {
120+
if (retval) {
121+
zval_ptr_dtor(&retval);
122+
}
123+
zend_bailout();
124+
}
125+
112126
FINISH;
113127
}
114128

0 commit comments

Comments
 (0)