=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/less/optfunc.c,v retrieving revision 1.16 retrieving revision 1.17 diff -u -r1.16 -r1.17 --- src/usr.bin/less/optfunc.c 2016/09/17 15:06:41 1.16 +++ src/usr.bin/less/optfunc.c 2018/03/17 13:29:12 1.17 @@ -71,7 +71,7 @@ } switch (type) { case INIT: - namelogfile = s; + namelogfile = estrdup(s); break; case TOGGLE: if (ch_getflags() & CH_CANSEEK) { @@ -83,6 +83,7 @@ return; } s = skipsp(s); + free(namelogfile); namelogfile = lglob(s); use_logfile(namelogfile); sync_logfile();