diff options
author | Ævar Arnfjörð Bjarmason <avarab@gmail.com> | 2021-10-20 18:27:21 (GMT) |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2021-10-20 18:36:13 (GMT) |
commit | d72d4f92e2e0fed38c6173c31e86b1b8881600e8 (patch) | |
tree | 70489c867671e8303b51e705c660696b9785feca /git-curl-compat.h | |
parent | e5fb028688f5811bd835c0bc47f8d7a379a0d152 (diff) | |
download | git-d72d4f92e2e0fed38c6173c31e86b1b8881600e8.zip git-d72d4f92e2e0fed38c6173c31e86b1b8881600e8.tar.gz git-d72d4f92e2e0fed38c6173c31e86b1b8881600e8.tar.bz2 |
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 'git-curl-compat.h')
0 files changed, 0 insertions, 0 deletions