[PATCH] expand_word_internal: fix leak with W_NOSPLIT2
From:
Grisha Levit
Subject:
[PATCH] expand_word_internal: fix leak with W_NOSPLIT2
Date:
Fri, 31 May 2024 18:55:31 -0400
Free temporary list allocated when exapnding `$@' in
bash -c 'IFS=:; : ${_+$@}' _ X
---
subst.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/subst.c b/subst.c
index 3faa4068..c56d2434 100644
--- a/subst.c
+++ b/subst.c
@@ -12144,6 +12144,7 @@ finished_with_string:
return, we expect to be able to split the results, but the
space separation means the right split doesn't happen. */
tword->word = string_list (list);
+ dispose_words (list);
}
else
tword->word = istring;
--
2.45.1
[Prev in Thread]
Current Thread
[Next in Thread]
[PATCH] expand_word_internal: fix leak with W_NOSPLIT2,
Grisha Levit<=