From 303b61dc6b9ef5e5c52853498ba9abc2338a302e Mon Sep 17 00:00:00 2001 From: Ilia Alshanetsky Date: Sun, 7 Jun 2026 16:40:20 -0400 Subject: [PATCH] readline: Fix memory leak in interactive shell INI directive The readline() buffer is not freed on the #name=value INI-directive branch before continue, unlike the sibling branches. --- ext/readline/readline_cli.c | 1 + 1 file changed, 1 insertion(+) diff --git a/ext/readline/readline_cli.c b/ext/readline/readline_cli.c index 2b0950784bf2..ca4e8eb4fe9f 100644 --- a/ext/readline/readline_cli.c +++ b/ext/readline/readline_cli.c @@ -662,6 +662,7 @@ static int readline_shell_run(void) /* {{{ */ zend_string_release_ex(prompt, 0); /* TODO: This might be wrong! */ prompt = cli_get_prompt("php", '>'); + free(line); continue; } }