Commit 51a94d8
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>1 parent 4a04790 commit 51a94d8
1 file changed
+7
-5
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1685 | 1685 | | |
1686 | 1686 | | |
1687 | 1687 | | |
| 1688 | + | |
1688 | 1689 | | |
1689 | 1690 | | |
1690 | 1691 | | |
| |||
1703 | 1704 | | |
1704 | 1705 | | |
1705 | 1706 | | |
1706 | | - | |
1707 | | - | |
| 1707 | + | |
| 1708 | + | |
1708 | 1709 | | |
1709 | 1710 | | |
1710 | | - | |
1711 | | - | |
| 1711 | + | |
| 1712 | + | |
1712 | 1713 | | |
1713 | 1714 | | |
1714 | 1715 | | |
1715 | 1716 | | |
1716 | 1717 | | |
1717 | 1718 | | |
1718 | 1719 | | |
| 1720 | + | |
1719 | 1721 | | |
1720 | 1722 | | |
1721 | 1723 | | |
1722 | 1724 | | |
1723 | | - | |
| 1725 | + | |
1724 | 1726 | | |
1725 | 1727 | | |
1726 | 1728 | | |
| |||
0 commit comments