Re: [PATCH 02/20] convert: fix leaks when resetting attributes

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

 



Patrick Steinhardt <ps@xxxxxx> 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 <ps@xxxxxx>
> ---

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.




[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