From f945c82ec693671e94830b4c0580aba8ea7ae2a5 Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Wed, 11 Sep 2019 10:59:04 +0200 Subject: [PATCH] Free history_get_history_state() result It's not documented, but per https://bugs.python.org/issue8065 the result is freshly malloc'd and needs to be freed. --- ext/readline/readline.c | 1 + 1 file changed, 1 insertion(+) diff --git a/ext/readline/readline.c b/ext/readline/readline.c index b9435521ca..174556d4d3 100644 --- a/ext/readline/readline.c +++ b/ext/readline/readline.c @@ -441,6 +441,7 @@ PHP_FUNCTION(readline_list_history) } } } + free(hs); } #else /* readline */ -- 2.40.0