Re: [PATCH 10/24] revisions API users: use release_revisions() in builtin/log.c
- From
Taylor Blau <me@ttaylorr.com>
- Date
- Mar 9, 2022, 21:53 UTC
- Message-ID
- <Yikh0Cu3IJt16pIZ@nand.local>
- In-Reply-To
- <patch-10.24-a89f0da4fd7-20220309T123321Z-avarab@gmail.com>
On Wed, Mar 09, 2022 at 02:16:40PM +0100, Ævar Arnfjörð Bjarmason wrote:
> In the case of "format-patch" revert the addition of UNLEAK() in > dee839a2633 (format-patch: mark rev_info with UNLEAK, 2021-12-16), and > which will cause several tests that previously passed under > "TEST_PASSES_SANITIZE_LEAK=true" to start failing.
Thanks for calling this out. When I skimmed the diff first, I wasn't sure whether the change in t4126 was intentional or not. But this is helpful context to indicate that it was.
Show 8 quoted lines
> @@ -731,8 +737,7 @@ int cmd_show(int argc, const char **argv, const char *prefix)
> ret = error(_("unknown type: %d"), o->type);
> }
> }
> - free(objects);
> - return ret;
> + return cmd_log_deinit(ret, &rev);
> }Here `objects` points at `rev.pending.objects`, and that is now freed along the cmd_log_deinit() -> release_revision() -> object_array_clear() path.
Makes sense, and the rest looks good, too.
Thanks, Taylor