[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <063D6719AE5E284EB5DD2968C1650D6D5F4E502E@AcuExch.aculab.com>
Date: Mon, 27 Jun 2016 09:59:00 +0000
From: David Laight <David.Laight@...LAB.COM>
To: 'Ivan Vecera' <ivecera@...hat.com>,
Ben Hutchings <ben@...adent.org.uk>,
"netdev@...r.kernel.org" <netdev@...r.kernel.org>
CC: "bwh@...nel.org" <bwh@...nel.org>
Subject: RE: [PATCH ethtool] ethtool.c: fix memory leaks
From: Ivan Vecera
> Sent: 27 June 2016 10:41
> On 26.6.2016 10:59, Ben Hutchings wrote:
> > On Fri, 2016-03-18 at 13:24 +0100, Ivan Vecera wrote:
> >> Memory allocated at several places is not appropriately freed.
> >
> > Given that ethtool is not a library or a long-running application - why
> > does that matter?
> >
> > Ben.
>
> Because each decently written program should clean up. Sure the kernel
> will take care about it after exit but we cannot accept the fact that
> short-running applications can behave like a pig.
It really doesn't matter except for memory that might be allocated
repeatedly.
The risks of getting it wrong probably outway any minor benefit.
free() is also unlikely to reduce the program size (to do so would require
a system call and TLB flush on top of everything else).
David
Powered by blists - more mailing lists