Re: [PATCH 08/23] builtin/submodule--helper: fix leaking remote ref on errors
- From
Justin Tobler <jltobler@gmail.com>
- Date
- Sep 16, 2024, 18:51 UTC
- Message-ID
- <l5aljv4zlvkfpjsizofsypgfaxdzkihwghd3voxin5oxibuixz@fesroo5tihzi>
- In-Reply-To
- <d088703d317a8598e1cc4eb068234c105cdeffe6.1726484308.git.ps@pks.im>
On 24/09/16 01:45PM, Patrick Steinhardt wrote:
> When `update_submodule()` fails we return with `die_message()`. > Curiously enough, this causes a memory leak because we use the > `run_process_parallel()` interfaces here, which swap out the die > routine.
Naive question, is `update_submodule()` itself being run in parallel here? Is that why the die routine gets swapped out so a child process dying is handled differently? Also is it correct to say leaks are not considered when we "die" normally?
> Fix the leak by freeing the remote ref. > > Signed-off-by: Patrick Steinhardt <ps@pks.im>