about summary refs log tree commit diff
path: root/Src/hist.c
diff options
context:
space:
mode:
authorPeter Stephenson <pws@users.sourceforge.net>2009-08-16 20:37:44 +0000
committerPeter Stephenson <pws@users.sourceforge.net>2009-08-16 20:37:44 +0000
commitfff4f63b9797b70ec384b500def849437bab75f9 (patch)
treeea9d6e49e6373f8b24ba98042a5881446f4fd27c /Src/hist.c
parent2237f7376e4259eb068399a2baa56d246d038dae (diff)
downloadzsh-fff4f63b9797b70ec384b500def849437bab75f9.tar.gz
zsh-fff4f63b9797b70ec384b500def849437bab75f9.tar.xz
zsh-fff4f63b9797b70ec384b500def849437bab75f9.zip
27216: set chwords to NULL when freed
Diffstat (limited to 'Src/hist.c')
-rw-r--r--Src/hist.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/Src/hist.c b/Src/hist.c
index 7f52ee08b..86b08bd45 100644
--- a/Src/hist.c
+++ b/Src/hist.c
@@ -1156,6 +1156,7 @@ hend(Eprog prog)
 	zfree(chline, hlinesz);
 	zfree(chwords, chwordlen*sizeof(short));
 	chline = NULL;
+	chwords = NULL;
 	histactive = 0;
 	unqueue_signals();
 	return 1;
@@ -1270,6 +1271,7 @@ hend(Eprog prog)
     zfree(chline, hlinesz);
     zfree(chwords, chwordlen*sizeof(short));
     chline = NULL;
+    chwords = NULL;
     histactive = 0;
     if (isset(SHAREHISTORY)? histfileIsLocked() : isset(INCAPPENDHISTORY))
 	savehistfile(hf, 0, HFILE_USE_OPTIONS | HFILE_FAST);