Revision 27ed6ccc12a331a1e6014f2fe101a2c551167e9e authored by Jeff King on 27 August 2020, 05:25:04 UTC, committed by Junio C Hamano on 27 August 2020, 15:30:17 UTC
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>
1 parent 47ae905
History
File Mode Size
.gitignore -rw-r--r-- 22 bytes
Makefile -rw-r--r-- 1.7 KB
branches-- -rw-r--r-- 47 bytes
hooks--applypatch-msg.sample -rwxr-xr-x 478 bytes
hooks--commit-msg.sample -rwxr-xr-x 896 bytes
hooks--fsmonitor-watchman.sample -rwxr-xr-x 4.5 KB
hooks--post-update.sample -rwxr-xr-x 189 bytes
hooks--pre-applypatch.sample -rwxr-xr-x 424 bytes
hooks--pre-commit.sample -rwxr-xr-x 1.6 KB
hooks--pre-merge-commit.sample -rwxr-xr-x 416 bytes
hooks--pre-push.sample -rwxr-xr-x 1.3 KB
hooks--pre-rebase.sample -rwxr-xr-x 4.8 KB
hooks--pre-receive.sample -rwxr-xr-x 544 bytes
hooks--prepare-commit-msg.sample -rwxr-xr-x 1.5 KB
hooks--update.sample -rwxr-xr-x 3.5 KB
info--exclude -rw-r--r-- 240 bytes
this--description -rw-r--r-- 73 bytes

back to top