Browse Source

fixed #67, to success compile on OOM

git-svn-id: svn://svn.lighttpd.net/xcache/trunk@353 c26eb9a1-5813-0410-bd6c-c2e55f420ca7
3.0
Xuefer 15 years ago
parent
commit
04c478d413
  1. 11
      xcache.c

11
xcache.c

@ -1323,7 +1323,6 @@ static zend_op_array *xc_compile_file(zend_file_handle *h, int type TSRMLS_DC) /
if (newlycompiled) {
xc_free_php(&php TSRMLS_CC);
xc_sandbox_free(&sandbox, 0 TSRMLS_CC);
}
if (stored_xce) {
@ -1336,8 +1335,18 @@ static zend_op_array *xc_compile_file(zend_file_handle *h, int type TSRMLS_DC) /
efree(op_array);
h = NULL;
}
if (newlycompiled) {
xc_sandbox_free(&sandbox, 0 TSRMLS_CC);
}
return xc_compile_restore(stored_xce, h TSRMLS_CC);
}
else {
if (newlycompiled) {
/* install it */
CG(active_op_array) = op_array;
xc_sandbox_free(&sandbox, 1 TSRMLS_CC);
}
}
return op_array;
err_aftersandbox:

Loading…
Cancel
Save