summaryrefslogtreecommitdiff
path: root/ext
diff options
context:
space:
mode:
authorRemi Collet <remi@php.net>2014-01-20 08:40:39 +0100
committerRemi Collet <remi@php.net>2014-01-20 08:40:39 +0100
commit91513097cac920e7731cf0520c22f61574416864 (patch)
tree438618fee1782648301940afe8400149e03ef520 /ext
parentfb7e25d2e01a937c11c7e1f82a45cadd19baadb6 (diff)
parent31d67bd35362c1ab570caccedfec3e24257b55c5 (diff)
downloadphp-git-91513097cac920e7731cf0520c22f61574416864.tar.gz
Merge branch 'PHP-5.5' into PHP-5.6
* PHP-5.5: Fixed Bug #66412 readline_clear_history() with libedit causes segfault after #65714
Diffstat (limited to 'ext')
-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;