Re: [PATCH] mailmap.c: fix a memory leak in free_mailap_{info,entry}()

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

 



On Tue, Aug 31, 2021 at 9:43 AM Ævar Arnfjörð Bjarmason
<avarab@xxxxxxxxx> wrote:
> In the free_mailmap_entry() code added in 0925ce4d49 (Add map_user()
> and clear_mailmap() to mailmap, 2009-02-08) the intent was clearly to
> clear the "me" structure, but while we freed parts of the
> mailmap_entry structure, we didn't free the structure itself. The same
> goes for the "mailmap_info" structure.
>
> This brings us from 50 failures when running t4203-mailmap.sh to
> 49. Not really progress as far as the number of failures is concerned,
> but as far as I can tell this fixes all leaks in mailmap.c
> itself. There's still users of it such as builtin/log.c that call
> read_mailmap() without a clear_mailmap(), but that's on them.

As a standalone patch, the "50 failures" is confusing and sounds quite
alarming. Adding even a tiny bit of context:

    s/50 failure/50 SANITIZE failures/

would help reduce the confusion. Alternatively, just dropping the
second paragraph altogether would clear up any misunderstanding since
the first paragraph and the patch body stand well on their own without
any additional explanation.

> Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@xxxxxxxxx>



[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