com php-src: Do not display memory leaks on fatal: sapi/phpdbg/phpdbg.c
| From: | Bob Weinand | Date: | Fri, 02 Oct 2015 10:37:40 +0000 |
| Subject: | com php-src: Do not display memory leaks on fatal: sapi/phpdbg/phpdbg.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-89258@lists.php.net to get a copy of this message | ||
Commit: 32337d35cc6f3afe54d97b4d654c0c36e8657406
Author: Bob Weinand <bobwei9@hotmail.com> Fri, 2 Oct 2015 12:03:28 +0200
Parents: 6c61286da4f2d71e659da70842168d71835292f9
Branches: PHP-7.0
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=32337d35cc6f3afe54d97b4d654c0c36e8657406
Log:
Do not display memory leaks on fatal
Changed paths:
M sapi/phpdbg/phpdbg.c
Diff:
diff --git a/sapi/phpdbg/phpdbg.c b/sapi/phpdbg/phpdbg.c
index 30edec4..fb9deda 100644
--- a/sapi/phpdbg/phpdbg.c
+++ b/sapi/phpdbg/phpdbg.c
@@ -793,7 +793,7 @@ static void php_sapi_phpdbg_send_header(sapi_header_struct *sapi_header, void *s
static void php_sapi_phpdbg_log_message(char *message) /* {{{ */
{
/*
- * We must not request TSRM before being boot
+ * We must not request TSRM before being booted
*/
if (phpdbg_booted) {
if (PHPDBG_G(flags) & PHPDBG_IN_EVAL) {
@@ -803,6 +803,10 @@ static void php_sapi_phpdbg_log_message(char *message) /* {{{ */
phpdbg_error("php", "msg=\"%s\"", "%s", message);
+ if (PHPDBG_G(flags) & PHPDBG_PREVENT_INTERACTIVE) {
+ return;
+ }
+
switch (PG(last_error_type)) {
case E_ERROR:
case E_CORE_ERROR:
@@ -813,7 +817,7 @@ static void php_sapi_phpdbg_log_message(char *message) /* {{{ */
const char *file_char = zend_get_executed_filename();
zend_string *file = zend_string_init(file_char, strlen(file_char), 0);
phpdbg_list_file(file, 3, zend_get_executed_lineno() - 1, zend_get_executed_lineno());
- efree(file);
+ zend_string_release(file);
if (!phpdbg_fully_started) {
return;
@@ -1936,7 +1940,7 @@ phpdbg_out:
/* In case we aborted during script execution, we may not reset CG(unclean_shutdown) */
if (!(PHPDBG_G(flags) & PHPDBG_IS_RUNNING)) {
- is_exit = !PHPDBG_G(in_execution) && EG(exit_status) != 255;
+ is_exit = !PHPDBG_G(in_execution);
CG(unclean_shutdown) = is_exit || PHPDBG_G(unclean_eval);
}