about summary refs log tree commit diff
path: root/Src/hist.c
diff options
context:
space:
mode:
authorPeter Stephenson <pws@users.sourceforge.net>2010-03-22 23:20:11 +0000
committerPeter Stephenson <pws@users.sourceforge.net>2010-03-22 23:20:11 +0000
commitc2fdffa316b8a67bc4bc61a0f5c68ecc27a68b6b (patch)
treed9057198126e0c8d9bec85d176a04029f1846d1f /Src/hist.c
parent872e7ab08c6e9a910a2742987d2c49852e40a1c4 (diff)
downloadzsh-c2fdffa316b8a67bc4bc61a0f5c68ecc27a68b6b.tar.gz
zsh-c2fdffa316b8a67bc4bc61a0f5c68ecc27a68b6b.tar.xz
zsh-c2fdffa316b8a67bc4bc61a0f5c68ecc27a68b6b.zip
27823: fix memory access in 27822
Diffstat (limited to 'Src/hist.c')
-rw-r--r--Src/hist.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/Src/hist.c b/Src/hist.c
index 08a613d4c..ee5422cc9 100644
--- a/Src/hist.c
+++ b/Src/hist.c
@@ -1171,7 +1171,7 @@ hend(Eprog prog)
     if (histactive & HA_NOINC) {
 	zfree(chline, hlinesz);
 	zfree(chwords, chwordlen*sizeof(short));
-	chline = NULL;
+	chline = hptr = NULL;
 	chwords = NULL;
 	histactive = 0;
 	unqueue_signals();
@@ -1286,7 +1286,7 @@ hend(Eprog prog)
     }
     zfree(chline, hlinesz);
     zfree(chwords, chwordlen*sizeof(short));
-    chline = NULL;
+    chline = hptr = NULL;
     chwords = NULL;
     histactive = 0;
     if (isset(SHAREHISTORY)? histfileIsLocked() : isset(INCAPPENDHISTORY))