diff options
author | Ævar Arnfjörð Bjarmason <avarab@gmail.com> | 2023-02-07 00:07:44 +0100 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2023-02-06 15:34:38 -0800 |
commit | eef75d247a5f1ce07cb21fa05196cdf7bc443e13 (patch) | |
tree | 84a0bcfac88465ce8bde87b6a9c4e4712f12ed1d /builtin/commit-graph.c | |
parent | 9f24f3c719ccb4553f97a861c37cbedcc7357762 (diff) |
http-backend.c: fix "dir" and "cmd_arg" leaks in cmd_main()
Free the "dir" variable after we're done with it. Before
917adc03608 (http-backend: add GIT_PROJECT_ROOT environment var,
2009-10-30) there was no leak here, as we'd get it via getenv(), but
since 917adc03608 we've xstrdup()'d it (or the equivalent), so we need
to free() it.
We also need to free the "cmd_arg" variable, which has been leaked
ever since it was added in 2f4038ab337 (Git-aware CGI to provide dumb
HTTP transport, 2009-10-30).
Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'builtin/commit-graph.c')
0 files changed, 0 insertions, 0 deletions