]> git.ipfire.org Git - thirdparty/git.git/commit
git: refactor builtin handling to use a `struct strvec`
authorPatrick Steinhardt <ps@pks.im>
Wed, 20 Nov 2024 13:39:40 +0000 (14:39 +0100)
committerJunio C Hamano <gitster@pobox.com>
Wed, 20 Nov 2024 23:23:43 +0000 (08:23 +0900)
commit1dd7c32daa7d8a4b71d9204f1edbb09a7241e18f
tree397df6215322ce2713d2ab8beb36f91d681a9450
parentffc5c046fb4f47e149687963706bb2390f4eed61
git: refactor builtin handling to use a `struct strvec`

Similar as with the preceding commit, `handle_builtin()` does not
properly track lifetimes of the `argv` array and its strings. As it may
end up modifying the array this can lead to memory leaks in case it
contains allocated strings.

Refactor the function to use a `struct strvec` instead.

Signed-off-by: Patrick Steinhardt <ps@pks.im>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
git.c
t/t0211-trace2-perf.sh