Commit 0a4d315
submodule--helper: don't leak {run,capture}_command() cp.dir argument
Fix a memory leak in c51f8f9 (submodule--helper: run update
procedures from C, 2021-08-24) and 3c3558f (submodule--helper: run
update using child process struct, 2022-03-15) by not allocating
memory in the first place.
The "dir" member of "struct child_process" will not be modified by
that API, and it's declared to be "const char *". So let's not
needlessly duplicate these strings.
Signed-off-by: Ævar Arnfjörð Bjarmason <[email protected]>
Reviewed-by: Glen Choo <[email protected]>
Signed-off-by: Junio C Hamano <[email protected]>1 parent 4b9d124 commit 0a4d315
1 file changed
+3
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2126 | 2126 | | |
2127 | 2127 | | |
2128 | 2128 | | |
2129 | | - | |
| 2129 | + | |
2130 | 2130 | | |
2131 | 2131 | | |
2132 | 2132 | | |
| |||
2145 | 2145 | | |
2146 | 2146 | | |
2147 | 2147 | | |
2148 | | - | |
| 2148 | + | |
2149 | 2149 | | |
2150 | 2150 | | |
2151 | 2151 | | |
| |||
2198 | 2198 | | |
2199 | 2199 | | |
2200 | 2200 | | |
2201 | | - | |
| 2201 | + | |
2202 | 2202 | | |
2203 | 2203 | | |
2204 | 2204 | | |
| |||
0 commit comments