Skip to content

Commit 303b61d

Browse files
committed
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.
1 parent 17f6752 commit 303b61d

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

ext/readline/readline_cli.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -662,6 +662,7 @@ static int readline_shell_run(void) /* {{{ */
662662
zend_string_release_ex(prompt, 0);
663663
/* TODO: This might be wrong! */
664664
prompt = cli_get_prompt("php", '>');
665+
free(line);
665666
continue;
666667
}
667668
}

0 commit comments

Comments
 (0)