summaryrefslogtreecommitdiff
path: root/sapi/phpdbg/phpdbg.c
diff options
context:
space:
mode:
authorBob Weinand <bobwei9@hotmail.com>2015-10-02 12:03:28 +0200
committerBob Weinand <bobwei9@hotmail.com>2015-10-02 12:37:40 +0200
commit32337d35cc6f3afe54d97b4d654c0c36e8657406 (patch)
tree8488b4cb508e8f5fa6c8e5911c8bb34548c27eb5 /sapi/phpdbg/phpdbg.c
parent6c61286da4f2d71e659da70842168d71835292f9 (diff)
downloadphp-git-32337d35cc6f3afe54d97b4d654c0c36e8657406.tar.gz
Do not display memory leaks on fatal
Diffstat (limited to 'sapi/phpdbg/phpdbg.c')
-rw-r--r--sapi/phpdbg/phpdbg.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/sapi/phpdbg/phpdbg.c b/sapi/phpdbg/phpdbg.c
index 30edec4634..fb9deda2a7 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);
}