about summary refs log tree commit diff
diff options
context:
space:
mode:
authorClint Adams <clint@users.sourceforge.net>2007-09-13 10:14:56 +0000
committerClint Adams <clint@users.sourceforge.net>2007-09-13 10:14:56 +0000
commit8deb3e6c43a30e6669aa55fefd9c29f81507ca50 (patch)
treebb93f39a3ad9b4ae526f93032659f02474b68751
parentf5a6b2a8c93a4f30e32f59280d91c7495b6879ef (diff)
downloadzsh-8deb3e6c43a30e6669aa55fefd9c29f81507ca50.tar.gz
zsh-8deb3e6c43a30e6669aa55fefd9c29f81507ca50.tar.xz
zsh-8deb3e6c43a30e6669aa55fefd9c29f81507ca50.zip
2381x: set vipenultsrchstr to NULL after freeing it to avoid vi-mode history search segfaults.
-rw-r--r--ChangeLog5
-rw-r--r--Src/Zle/zle_hist.c1
2 files changed, 6 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index 593b053de..1f254df40 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2007-09-13  Clint Adams  <clint@zsh.org>
+
+	* 2381x: Src/Zle/zle_hist.c: set vipenultsrchstr to NULL
+	after freeing it to avoid vi-mode history search segfaults.
+
 2007-09-05  Peter Stephenson  <pws@csr.com>
 
 	* users/11818: Doc/Zsh/mod_parameter.yo, Src/jobs.c, Src/utils.c,
diff --git a/Src/Zle/zle_hist.c b/Src/Zle/zle_hist.c
index bb740d75c..38f32b97c 100644
--- a/Src/Zle/zle_hist.c
+++ b/Src/Zle/zle_hist.c
@@ -1240,6 +1240,7 @@ getvisrchstr(void)
 
     if (vipenultsrchstr) {
 	zsfree(vipenultsrchstr);
+	vipenultsrchstr = NULL;
     }
 
     if (visrchstr) {