summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRemi Collet <remi@php.net>2014-01-20 08:41:04 +0100
committerRemi Collet <remi@php.net>2014-01-20 08:41:04 +0100
commit3b82a477b0bfb6f58e5ba1f10fa8453a1304e029 (patch)
tree1ae5765df7f529632ded5fd0c156dd057faed98b
parentfd45f1eb78febce56b31b17bbccdc9cea3b26588 (diff)
parent91513097cac920e7731cf0520c22f61574416864 (diff)
downloadphp-git-3b82a477b0bfb6f58e5ba1f10fa8453a1304e029.tar.gz
Merge branch 'PHP-5.6'
* PHP-5.6: Fixed Bug #66412 readline_clear_history() with libedit causes segfault after #65714
-rw-r--r--ext/readline/readline.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/ext/readline/readline.c b/ext/readline/readline.c
index ecd5533350..4bd9103462 100644
--- a/ext/readline/readline.c
+++ b/ext/readline/readline.c
@@ -354,6 +354,11 @@ PHP_FUNCTION(readline_clear_history)
return;
}
+#if HAVE_LIBEDIT
+ /* clear_history is the only function where rl_initialize
+ is not call to ensure correct allocation */
+ using_history();
+#endif
clear_history();
RETURN_TRUE;