Re: [PATCH v2 5/7] ls-files: fix a trivial dir_clear() leak

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Ævar Arnfjörð Bjarmason  <avarab@xxxxxxxxx> writes:

> This does add a bit of complexity, but I think it's worth it to just
> fix these leaks when it's easy in built-ins. It allows them to serve
> as canaries for underlying APIs that shouldn't be leaking, it
> encourages us to make those freeing APIs nicer for all their users,
> and it prevents other leaking regressions by being able to mark the
> entire test as TEST_PASSES_SANITIZE_LEAK=true.

This does more than necessary, though.  Introducing "ret", replacing
an early return with an assignment to it, and returning "ret"
instead of hardcoded 0, would have been the "fix a trivial leak",
and the "ah, report_path_error() always returns true" does not
belong here.

These things look small, but small things add up.




[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux