summaryrefslogtreecommitdiff
path: root/sapi/phpdbg/phpdbg_prompt.c
diff options
context:
space:
mode:
Diffstat (limited to 'sapi/phpdbg/phpdbg_prompt.c')
-rw-r--r--sapi/phpdbg/phpdbg_prompt.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/sapi/phpdbg/phpdbg_prompt.c b/sapi/phpdbg/phpdbg_prompt.c
index d8a31184d3..bd6f7349ac 100644
--- a/sapi/phpdbg/phpdbg_prompt.c
+++ b/sapi/phpdbg/phpdbg_prompt.c
@@ -1632,7 +1632,14 @@ int phpdbg_interactive(zend_bool allow_async_unsafe, char *input) /* {{{ */
sigio_watcher_start();
}
#endif
- switch (ret = phpdbg_stack_execute(&stack, allow_async_unsafe)) {
+ zend_try {
+ ret = phpdbg_stack_execute(&stack, allow_async_unsafe);
+ } zend_catch {
+ phpdbg_stack_free(&stack);
+ zend_bailout();
+ } zend_end_try();
+
+ switch (ret) {
case FAILURE:
if (!(PHPDBG_G(flags) & PHPDBG_IS_STOPPING)) {
if (!allow_async_unsafe || phpdbg_call_register(&stack) == FAILURE) {