diff options
author | Jeff King <peff@peff.net> | 2020-08-27 01:25:04 -0400 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2020-08-27 08:30:17 -0700 |
commit | 27ed6ccc12a331a1e6014f2fe101a2c551167e9e (patch) | |
tree | 6542ae3eb9f193a729b512cf24f04303c2da7fb9 /t/t5100/info0006 | |
parent | Git 2.28 (diff) | |
download | tgif-27ed6ccc12a331a1e6014f2fe101a2c551167e9e.tar.xz |
worktree: fix leak in check_clean_worktree()
We allocate a child_env strvec but never free its memory. Instead, let's
just use the strvec that our child_process struct provides, which is
cleaned up automatically when we run the command.
And while we're moving the initialization of the child_process around,
let's switch it to use the official init function (zero-initializing it
works OK, since strvec is happy enough with that, but it sets a bad
example).
Signed-off-by: Jeff King <peff@peff.net>
Reviewed-by: Eric Sunshine <sunshine@sunshineco.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t5100/info0006')
0 files changed, 0 insertions, 0 deletions