Re: [PATCH 11/15] builtin/check-attr: fix a memleak
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Mar 21, 2015, 04:02 UTC
- Message-ID
- <xmqqfv8zathi.fsf@gitster.dls.corp.google.com>
- In-Reply-To
- <1426897692-18322-12-git-send-email-sbeller@google.com>
Stefan Beller <sbeller@google.com> writes:
Show 12 quoted lines
> Signed-off-by: Stefan Beller <sbeller@google.com> > --- > > Notes: > I do not quite recall a discussion about such fixes > when I started doing these fixes like 2 years ago. > > As this is a main function of a subcommand the freed > memory is likely to have no impact as the process > is done soon, so then it gets freed by the OS which > is likey to be faster as the OS frees the whole pages > of the process.
You seem to understand it well without "recalling" ;-)
As you said, unless the false hits from valgrind on these overwhelm the real issues we are looking for, it is usually not worth the patch churn to fix these. Another valid reason is if we plan to libify a function that used to be a top-level.