=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/mg/extend.c,v retrieving revision 1.70 retrieving revision 1.71 diff -u -r1.70 -r1.71 --- src/usr.bin/mg/extend.c 2019/07/18 05:57:48 1.70 +++ src/usr.bin/mg/extend.c 2019/07/18 15:52:11 1.71 @@ -1,4 +1,4 @@ -/* $OpenBSD: extend.c,v 1.70 2019/07/18 05:57:48 lum Exp $ */ +/* $OpenBSD: extend.c,v 1.71 2019/07/18 15:52:11 lum Exp $ */ /* This file is in the public domain. */ /* @@ -603,9 +603,12 @@ /* make sure it's terminated */ excbuf[llength(lp)] = '\0'; - if ((s = excline(excbuf)) != TRUE) + if ((s = excline(excbuf)) != TRUE) { + (void) clearvars(); return (s); + } } + (void) clearvars(); return (TRUE); }