diff --git a/NEWS b/NEWS index ae264a1a8..de32cb3d5 100644 --- a/NEWS +++ b/NEWS @@ -7,6 +7,9 @@ Any uppercase BUG_* names are modernish shell bug IDs. - Fixed another corner case bug in the 'test'/'[' command. +- A memory leak was fixed in the --man self-documentation options + of built-in commands. + 2022-03-05: - The 'enum' command can now create more than one type per invocation. diff --git a/src/cmd/ksh93/tests/leaks.sh b/src/cmd/ksh93/tests/leaks.sh index 287ba62c1..05d8040b1 100755 --- a/src/cmd/ksh93/tests/leaks.sh +++ b/src/cmd/ksh93/tests/leaks.sh @@ -418,7 +418,7 @@ DO DONE # ====== -TEST title='showing --man info' known=y url=https://github.com/ksh93/ksh/issues/407 +TEST title='showing --man info' DO set --man 2>/dev/null ulimit --man 2>/dev/null diff --git a/src/lib/libast/misc/optget.c b/src/lib/libast/misc/optget.c index c0ba75b36..d0c4b07d5 100644 --- a/src/lib/libast/misc/optget.c +++ b/src/lib/libast/misc/optget.c @@ -2157,6 +2157,7 @@ textout(Sfio_t* sp, register char* s, char* conform, int conformlen, int style, break; } } + pop(psp); return s; } s++;