commit-graph: stop fill_oids_from_packs() progress on error and free()
commit51a94d8ffe57ff40e1db1d5e46a1864a5ded7f49
authorÆvar Arnfjörð Bjarmason <avarab@gmail.com>
Fri, 4 Mar 2022 18:32:13 +0000 (4 19:32 +0100)
committerJunio C Hamano <gitster@pobox.com>
Fri, 4 Mar 2022 21:24:19 +0000 (4 13:24 -0800)
tree3d8cb22238e053b92a88f622430efa03b430d324
parent4a0479086a9bea5d31c4588b07bd45ae92a12b71
commit-graph: stop fill_oids_from_packs() progress on error and free()

Fix a bug in fill_oids_from_packs(), we should always stop_progress(),
but did not do so if we returned an error here. This also plugs a
memory leak in those cases by releasing the two "struct strbuf"
variables the function uses.

While I'm at it stop hardcoding "-1" here and just use the return
value of error() instead, which happens to be "-1".

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
commit-graph.c