about summary refs log tree commit diff
path: root/Src/hist.c
diff options
context:
space:
mode:
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);