diff options
| author | Ævar Arnfjörð Bjarmason <avarab@gmail.com> | 2022-09-01 01:14:12 +0200 |
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2022-09-02 09:18:12 -0700 |
| commit | 0a4d31537d66bd2249adc8d923e2e6829204059e (patch) | |
| tree | 8b1bd2812a9dc69c193679c3495e0a52cea6b67a /commit-graph.c | |
| parent | submodule--helper: "struct pathspec" memory leak in module_update() (diff) | |
| download | git-0a4d31537d66bd2249adc8d923e2e6829204059e.tar.gz git-0a4d31537d66bd2249adc8d923e2e6829204059e.zip | |
submodule--helper: don't leak {run,capture}_command() cp.dir argument
Fix a memory leak in c51f8f94e5b (submodule--helper: run update
procedures from C, 2021-08-24) and 3c3558f0953 (submodule--helper: run
update using child process struct, 2022-03-15) by not allocating
memory in the first place.
The "dir" member of "struct child_process" will not be modified by
that API, and it's declared to be "const char *". So let's not
needlessly duplicate these strings.
Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Reviewed-by: Glen Choo <chooglen@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'commit-graph.c')
0 files changed, 0 insertions, 0 deletions
