=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/less/cmdbuf.c,v retrieving revision 1.9 retrieving revision 1.10 diff -c -r1.9 -r1.10 *** src/usr.bin/less/cmdbuf.c 2015/11/06 15:50:33 1.9 --- src/usr.bin/less/cmdbuf.c 2015/11/07 18:07:44 1.10 *************** *** 688,694 **** * Save the command and put it at the end of the history list. */ ml = ecalloc(1, sizeof (struct mlist)); ! ml->string = save(cmd); ml->next = mlist; ml->prev = mlist->prev; mlist->prev->next = ml; --- 688,694 ---- * Save the command and put it at the end of the history list. */ ml = ecalloc(1, sizeof (struct mlist)); ! ml->string = estrdup(cmd); ml->next = mlist; ml->prev = mlist->prev; mlist->prev->next = ml; *************** *** 1207,1213 **** if (strcmp(name, "-") == 0 || strcmp(name, "/dev/null") == 0) /* $LESSHISTFILE == "-" means don't use history file */ return (NULL); ! return (save(name)); } /* Otherwise, file is in $HOME if enabled. */ --- 1207,1213 ---- if (strcmp(name, "-") == 0 || strcmp(name, "/dev/null") == 0) /* $LESSHISTFILE == "-" means don't use history file */ return (NULL); ! return (estrdup(name)); } /* Otherwise, file is in $HOME if enabled. */