about summary refs log tree commit diff
path: root/Src
diff options
context:
space:
mode:
Diffstat (limited to 'Src')
-rw-r--r--Src/hist.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/Src/hist.c b/Src/hist.c
index 4f78e7309..5c8ac8d95 100644
--- a/Src/hist.c
+++ b/Src/hist.c
@@ -971,7 +971,8 @@ prepnexthistent(void)
     }
     else {
 	putoldhistentryontop(0);
-	freehistdata(he = hist_ring, 0);
+	freehistdata(hist_ring, 0);
+	he = hist_ring;
     }
     he->histnum = ++curhist;
     if (curline_in_ring)