mirror of
git://git.code.sf.net/p/cdesktopenv/code
synced 2025-02-13 03:32:24 +00:00
libast: optget(3): Fix memory leak in --help/--man info
src/lib/libast/misc/optget.c: textout(): case ']': - Before returning, call pop() to free any \f...\f info items that are left. Note that this is a safe no-op if the pointer is null. Resolves: https://github.com/ksh93/ksh/issues/407 Co-authored-by: Martijn Dekker <martijn@inlv.org>
This commit is contained in:
parent
fd28da31da
commit
86b94d9feb
3 changed files with 5 additions and 1 deletions
3
NEWS
3
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.
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -2157,6 +2157,7 @@ textout(Sfio_t* sp, register char* s, char* conform, int conformlen, int style,
|
|||
break;
|
||||
}
|
||||
}
|
||||
pop(psp);
|
||||
return s;
|
||||
}
|
||||
s++;
|
||||
|
|
Loading…
Reference in a new issue