mirror of
https://github.com/php/php-src.git
synced 2024-09-22 02:17:32 +00:00
Fixed memory leak on require() error
This commit is contained in:
parent
442112503a
commit
5aa6dcc6c8
@ -571,8 +571,6 @@ PHPAPI void php_verror(const char *docref, const char *params, int type, const c
|
||||
if (docref_buf) {
|
||||
efree(docref_buf);
|
||||
}
|
||||
php_error(type, "%s", message);
|
||||
efree(message);
|
||||
|
||||
if (PG(track_errors) && module_initialized && EG(active_symbol_table)) {
|
||||
zval *tmp;
|
||||
@ -581,6 +579,9 @@ PHPAPI void php_verror(const char *docref, const char *params, int type, const c
|
||||
zend_hash_update(EG(active_symbol_table), "php_errormsg", sizeof("php_errormsg"), (void **) &tmp, sizeof(zval *), NULL);
|
||||
}
|
||||
efree(buffer);
|
||||
|
||||
php_error(type, "%s", message);
|
||||
efree(message);
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user