From: Junio C Hamano Date: Tue, 20 Aug 2024 19:51:01 GMT Subject: Re: [PATCH 02/20] convert: fix leaks when resetting attributes Message-ID: In-Reply-To: Patrick Steinhardt writes: > When resetting parsed gitattributes, we free the list of convert drivers > parsed from the config. We only free some of the drivers' fields though > and thus have memory leaks. > > Fix this by freeing all allocated convert driver fields to plug these > memory leaks. > > Signed-off-by: Patrick Steinhardt > --- The helper has only one caller, which makes me wonder why we do not have to call it more often. If "git checkout" or "log -p" notice an attribute file is updated, I wonder they should call it, for example. But of course this is completely out of scope of this topic. This has been leaking even before 9642479a (convert: fix leaking config strings, 2024-08-01) straightened out the ownership rules of the value obtained from git_config_string(). The fix makes sense. Will queue. Thanks.