diff options
author | Ævar Arnfjörð Bjarmason <avarab@gmail.com> | 2021-10-20 20:27:21 +0200 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2021-10-20 11:36:13 -0700 |
commit | d72d4f92e2e0fed38c6173c31e86b1b8881600e8 (patch) | |
tree | 70489c867671e8303b51e705c660696b9785feca /Documentation/lint-man-end-blurb.perl | |
parent | ref-filter API user: add and use a ref_sorting_release() (diff) | |
download | tgif-d72d4f92e2e0fed38c6173c31e86b1b8881600e8.tar.xz |
branch: use ref_sorting_release()
Use a ref_sorting_release() in branch.c to free the memory from the
ref_sorting_options(). This plugs the final in-tree memory leak of
that API.
In the preceding commit the "sorting" variable was left in the
cmd_branch() scope, even though that wasn't needed anymore. Move it to
the "else if (list)" scope instead. We can also move the "struct
string_list" only used for that branch to be declared in that block
That "struct ref_sorting" does not need to be "static" (and isn't
re-used). The "ref_sorting_options()" will return a valid one, we
don't need to make it "static" to have it zero'd out. That it was
static was another artifact of the pre-image of the preceding commit.
Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'Documentation/lint-man-end-blurb.perl')
0 files changed, 0 insertions, 0 deletions