summaryrefslogtreecommitdiff
path: root/commit.h
diff options
context:
space:
mode:
authorÆvar Arnfjörð Bjarmason <avarab@gmail.com>2022-09-01 01:14:21 +0200
committerJunio C Hamano <gitster@pobox.com>2022-09-02 09:18:13 -0700
commit25b6a95d03fe4fbb7acb8bbd0e1faad9a7f4ea9b (patch)
treea96b84fa86e1c91d2d01713146a8bf4a82079343 /commit.h
parent623bd7d154daf93e910414bfc8b3080c7269f2a6 (diff)
submodule--helper: fix a memory leak in print_status()
Fix a leak in print_status(), the compute_rev_name() function implemented in this file will return a strbuf_detach()'d value, or NULL. This leak has existed since this code was added in a9f8a37584a (submodule: port submodule subcommand 'status' from shell to C, 2017-10-06), but in 0b5e2ea7cf3 (submodule--helper: don't print null in 'submodule status', 2018-04-18) we added a "const" intermediate variable for the return value, that "const" should be removed. 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.h')
0 files changed, 0 insertions, 0 deletions