[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH] coproc: do not leak name
From: |
Grisha Levit |
Subject: |
[PATCH] coproc: do not leak name |
Date: |
Fri, 31 May 2024 17:32:06 -0400 |
When a named coproc is created, the name string and associated WORD_DESC
are leaked.
---
parse.y | 2 ++
1 file changed, 2 insertions(+)
diff --git a/parse.y b/parse.y
index d39d6737..fe5038be 100644
--- a/parse.y
+++ b/parse.y
@@ -1103,6 +1103,7 @@ coproc: COPROC shell_command
{
$$ = make_coproc_command ($2->word, $3);
$$->flags |= CMD_WANT_SUBSHELL|CMD_COPROC_SUBSHELL;
+ dispose_word ($2);
}
| COPROC WORD shell_command redirection_list
{
@@ -1120,6 +1121,7 @@ coproc: COPROC shell_command
tc->redirects = $4;
$$ = make_coproc_command ($2->word, $3);
$$->flags |= CMD_WANT_SUBSHELL|CMD_COPROC_SUBSHELL;
+ dispose_word ($2);
}
| COPROC simple_command
{
--
2.45.1
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [PATCH] coproc: do not leak name,
Grisha Levit <=