Re: [PATCH v2 05/12] diffcore-rename: move old_dir/new_dir definition to plug leak

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

 



andrzej@xxxxxxxxx writes:

> From: Andrzej Hunt <ajrhunt@xxxxxxxxxx>
>
> old_dir/new_dir are free()'d at the end of update_dir_rename_counts,
> however if we return early we'll never free those strings. Therefore
> we should move all new allocations after the possible early return,
> avoiding a leak.
>
> This seems like a fairly recent leak, that started happening since the
> early-return was added in:
>   1ad69eb0dc (diffcore-rename: compute dir_rename_counts in stages, 2021-02-27)

Yup.  It is not surprising to have issues in younger parts of the
code.  Thanks.



[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