Skip to content

Commit 167dcb0

Browse files
committed
Remove redundant code from lint mode, it should now do only what it needs to do
and not anything else, and should no longer leak.
1 parent 3276cfd commit 167dcb0

File tree

1 file changed

+6
-14
lines changed

1 file changed

+6
-14
lines changed

main/main.c

Lines changed: 6 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1323,30 +1323,22 @@ PHPAPI int php_handle_auth_data(const char *auth SLS_DC)
13231323
PHPAPI int php_lint_script(zend_file_handle *file CLS_DC ELS_DC PLS_DC)
13241324
{
13251325
zend_op_array *op_array;
1326-
int retval;
13271326
SLS_FETCH();
13281327

1329-
php_hash_environment(ELS_C SLS_CC PLS_CC);
1330-
1331-
zend_activate_modules();
1332-
PG(modules_activated)=1;
1333-
13341328
if (setjmp(EG(bailout))!=0) {
13351329
return FAILURE;
13361330
}
13371331

1338-
#ifdef PHP_WIN32
1339-
UpdateIniFromRegistry(file->filename);
1340-
#endif
1341-
13421332
op_array = zend_compile_file(file, ZEND_INCLUDE CLS_CC);
1343-
retval = (op_array?SUCCESS:FAILURE);
13441333

1345-
if (op_array != NULL) {
1334+
if (op_array) {
13461335
destroy_op_array(op_array);
1336+
efree(op_array);
1337+
zend_destroy_file_handle(file CLS_CC);
1338+
return SUCCESS;
1339+
} else {
1340+
return FAILURE;
13471341
}
1348-
1349-
return retval;
13501342
}
13511343
/* }}} */
13521344

0 commit comments

Comments
 (0)