diff options
author | Herbert Xu <herbert@gondor.apana.org.au> | 2010-10-18 10:55:42 +0800 |
---|---|---|
committer | maximilian attems <max@stro.at> | 2011-06-03 18:44:13 +0200 |
commit | 2c5cce537ca6492aaa27d7ffd38b0285ee54aaca (patch) | |
tree | a33434576e8a630f2e875fc8e27853b662309a8f | |
parent | 355bacf9ea94ac11cd3f730a0372aadc606e8055 (diff) | |
download | klibc-2c5cce537ca6492aaa27d7ffd38b0285ee54aaca.tar.gz |
[klibc] [EXPAND] Fix ifsfirst/ifslastp leak in casematch
The commit f42e443bb511ed3224f09b4fcf0772438ebdbbfa
[EXPAND] Fix ifsfirst/ifslastp leak
revealed yet another ifsfirst/ifslastp leak in casematch.
Previously it was hidden because ifsfirst/ifslastp was cleared
unconditionally on entry (which caused the leakage of those
entries).
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: maximilian attems <max@stro.at>
-rw-r--r-- | usr/dash/expand.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/usr/dash/expand.c b/usr/dash/expand.c index c5fb30a603b1f..b38c746859f27 100644 --- a/usr/dash/expand.c +++ b/usr/dash/expand.c @@ -1679,6 +1679,7 @@ casematch(union node *pattern, char *val) STARTSTACKSTR(expdest); argstr(pattern->narg.text, EXP_TILDE | EXP_CASE); STACKSTRNUL(expdest); + ifsfree(); result = patmatch(stackblock(), val); popstackmark(&smark); return result; |