about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--Src/hashtable.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/Src/hashtable.c b/Src/hashtable.c
index e88bc2477..c75a406e6 100644
--- a/Src/hashtable.c
+++ b/Src/hashtable.c
@@ -1480,7 +1480,7 @@ addhistnode(HashTable ht, char *nam, void *nodeptr)
     HashNode oldnode = addhashnode2(ht, nam, nodeptr);
     Histent he = (Histent)nodeptr;
     if (oldnode && oldnode != (HashNode)nodeptr) {
-	if (he->flags & (HIST_MAKEUNIQUE | HIST_TMPSTORE)
+	if (he->flags & HIST_MAKEUNIQUE
 	 || (he->flags & HIST_FOREIGN && (Histent)oldnode == he->up)) {
 	    (void) addhashnode2(ht, oldnode->nam, oldnode); /* restore hash */
 	    he->flags |= HIST_DUP;
@@ -1511,7 +1511,7 @@ freehistdata(Histent he, int unlink)
     if (!he)
 	return;
 
-    if (!(he->flags & HIST_DUP))
+    if (!(he->flags & (HIST_DUP | HIST_TMPSTORE)))
 	removehashnode(histtab, he->text);
 
     zsfree(he->text);