Re: [PATCH 4/4] add: plug a leak on interactive_add
On 4/22/24 5:43 PM, Phillip Wood wrote:
Show 16 quoted lines
>> Plug a leak we have since 5a76aff1a6 (add: convert to use
>> parse_pathspec, 2013-07-14).
>>
>> This leak can be triggered with:
>> $ git add -p anything
>>
>> Fixing this leak allows us to mark as leak-free the following tests:
>>
>> + t3701-add-interactive.sh
>> + t7514-commit-patch.sh
>>
>> Mark them with "TEST_PASSES_SANITIZE_LEAK=true" to notice and fix
>> promply any new leak that may be introduced and triggered by them in the
>> future.
>
> This makes me wonder if we're freeing the pathspec properly when using '--patch' in checkout, reset, restore and stash.
I haven't checked it thoroughly, but I think we're fine in those cases.