On Sun, Apr 03 2022, Phillip Wood wrote: > Hi Ævar > > On 02/04/2022 11:49, Ævar Arnfjörð Bjarmason wrote: >> Call diff_free() on the "pruning" member of "struct rev_info". Doing >> so makes several tests pass under SANITIZE=leak. >> This was also the last missing piece that allows us to remove the >> UNLEAK() in "cmd_diff" and "cmd_diff_index", which allows us to use >> those commands as a canary for general leaks in the revisions API. See >> [1] for further rationale, and 886e1084d78 (builtin/: add UNLEAKs, >> 2017-10-01) for the commit that added the UNLEAK() there. > > Oh is the the answer to my confusion about patch 14? I wonder if the > change could come earlier so we can remove the UNLEAK()s all at once? As noted in <220403.86mth2mfrh.gmgdl@xxxxxxxxxxxxxxxxxxx> (where I meant to say "series") It's this specific change that will free enough things for the tests to pass without these UNLEAK()s. And no, it can't come earlier beacuse just "pruning" or any other member isn't sufficient, this is just the last straw. IOW the API callers weren't calling UNLEAK() on specific members of "rev", but the whole struct. So we needed to fix a lot of leaks before we colud remove these.