From: krakjoe Date: Tue, 19 Nov 2013 13:22:46 +0000 (+0000) Subject: removed a loop X-Git-Tag: php-5.6.0alpha1~110^2~202 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=b2a19a42d18eb458bdfdc66c7e3af9ee31386186;p=php removed a loop --- diff --git a/phpdbg_prompt.c b/phpdbg_prompt.c index 92e39ec2cf..4095f3c298 100644 --- a/phpdbg_prompt.c +++ b/phpdbg_prompt.c @@ -970,25 +970,33 @@ int phpdbg_interactive(TSRMLS_D) /* {{{ */ phpdbg_input_t* input = phpdbg_read_input(TSRMLS_C); if (input) { - switch (ret = phpdbg_do_cmd(phpdbg_prompt_commands, input->string, input->length TSRMLS_CC)) { - case FAILURE: - if (!(PHPDBG_G(flags) & PHPDBG_IS_QUITTING)) { - if (phpdbg_call_register(input TSRMLS_CC) == FAILURE) { - phpdbg_error("Failed to execute %s!", input->string); + do { + switch (ret = phpdbg_do_cmd(phpdbg_prompt_commands, input->string, input->length TSRMLS_CC)) { + case FAILURE: + if (!(PHPDBG_G(flags) & PHPDBG_IS_QUITTING)) { + if (phpdbg_call_register(input TSRMLS_CC) == FAILURE) { + phpdbg_error("Failed to execute %s!", input->string); + } } - } - break; + break; - case PHPDBG_LEAVE: - case PHPDBG_FINISH: - case PHPDBG_UNTIL: - case PHPDBG_NEXT: { - if (!EG(in_execution)) { - phpdbg_error("Not running"); + case PHPDBG_LEAVE: + case PHPDBG_FINISH: + case PHPDBG_UNTIL: + case PHPDBG_NEXT: { + if (!EG(in_execution)) { + phpdbg_error("Not running"); + } + goto out; } - goto out; } - } + + if (input->string) { + efree(input->string); + } + efree(input); + + } while ((input = phpdbg_read_input(TSRMLS_C))); } else { if (PHPDBG_G(lcmd)) { ret = PHPDBG_G(lcmd)->handler(