Index: contrib/tcsh/sh.hist.c =================================================================== --- contrib/tcsh/sh.hist.c +++ contrib/tcsh/sh.hist.c @@ -1235,6 +1235,7 @@ struct stat st; static Char *fname; static Char *dumphist[] = {STRhistory, STRmhT, 0, 0}; + size_t omark; if (fname == NULL && !ref) return; @@ -1308,8 +1309,10 @@ #endif } getexit(osetexit); + omark = cleanup_push_mark(); if (setexit() == 0) loadhist(fname, 1); + cleanup_pop_mark(omark); resexit(osetexit); } }