Re: [PATCH 07/20] diff: refactor code to clarify memory ownership of prefixes

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


On Thu, May 23, 2024 at 8:26 AM Patrick Steinhardt <ps@xxxxxx> wrote:
> The source end destination prefixes are tracked in a `const char *`


> array, but may at times contain allocated strings. The result is that
> those strings may be leaking because we never free them.
> Refactor the code to always store allocated strings in those variables,
> freeing them as required. This requires us to handle the default values
> a bit different compared to before. But given that there is only a
> single callsite where we use the variables to `struct diff_options` it's
> easy to handle the defaults there.
> Signed-off-by: Patrick Steinhardt <ps@xxxxxx>

[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