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 *` s/end/and/ > 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>