From 151a4660e289c66d13b65d68ad2f10d93743d2d4 Mon Sep 17 00:00:00 2001 From: Peter Stephenson Date: Fri, 26 May 2017 11:06:59 +0100 Subject: 41164: Don't free a history entry if it's curline. This replaces 41113 / 94014ff65b with a simple local change for the immediate problem. It's not entirely clear if this reflects wider changes in the structure of the history code. --- Src/hashtable.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'Src/hashtable.c') diff --git a/Src/hashtable.c b/Src/hashtable.c index c34744cd8..6ec2ed220 100644 --- a/Src/hashtable.c +++ b/Src/hashtable.c @@ -1445,10 +1445,12 @@ freehistdata(Histent he, int unlink) if (!he) return; + if (he == &curline) + return; + if (!(he->node.flags & (HIST_DUP | HIST_TMPSTORE))) removehashnode(histtab, he->node.nam); - DPUTS(he->node.nam == chline, "Attempt to free chline in history data"); zsfree(he->node.nam); if (he->nwords) zfree(he->words, he->nwords*2*sizeof(short)); -- cgit 1.4.1