diff options
author | Ævar Arnfjörð Bjarmason <avarab@gmail.com> | 2022-03-04 19:32:16 +0100 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2022-03-04 13:24:19 -0800 |
commit | 2d102c2bca1a0c50f17108189f134279cad941cd (patch) | |
tree | 520e1d7953744b5f931fe706117406cd3e560bff /t/t5515/refs.br-config-explicit-octopus_config-explicit | |
parent | range-diff: plug memory leak in common invocation (diff) | |
download | tgif-2d102c2bca1a0c50f17108189f134279cad941cd.tar.xz |
range-diff: plug memory leak in read_patches()
Amend code added in d9c66f0b5bf (range-diff: first rudimentary
implementation, 2018-08-13) to use a "goto cleanup" pattern. This
makes for less code, and frees memory that we'd previously leak.
The reason for changing free(util) to FREE_AND_NULL(util) is because
at the end of the function we append the contents of "util" to a
"struct string_list" if it's non-NULL.
Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t5515/refs.br-config-explicit-octopus_config-explicit')
0 files changed, 0 insertions, 0 deletions