[PATCH] Fix bug #11177 - no talloc stackframe at ../source3/libsmb/clifsinfo.c:444, leaking memory

Volker Lendecke Volker.Lendecke at SerNet.DE
Mon Apr 13 23:08:17 MDT 2015


On Tue, Apr 14, 2015 at 02:12:33PM +1200, Andrew Bartlett wrote:
> On Thu, 2015-03-26 at 18:43 +0100, Michael Adam wrote:
> > The patch looks good, pushing.
> > 
> > One comment:
> > 
> > Somehow it feels awkward that all those SMBC_foo_ctx
> > functions should have to create a talloc stackframe
> > even if they don't need one themselves, just so that
> > functions later in the call chain can be lazy.
> > Can't this be done in a central place?
> > (Or have I lost it completely?)
> 
> This is perhaps the biggest (rational) reason why I dislike
> talloc_tos(). 

It does not play really well with publically exposed APIs, right. But from
my point of view it's a big benefit that our memory leaks in server code
have almost completely vanished. We have to balance this value against
the downside, as always.

If you can propose a better API that brings the same benefit, automatic
cleanup of most memory together with the speed improvement due to the
central talloc pool (yes, this is measurable!), I'm more than happy to
review your patch!

With best regards,

Volker

-- 
SerNet GmbH, Bahnhofsallee 1b, 37081 Göttingen
phone: +49-551-370000-0, fax: +49-551-370000-9
AG Göttingen, HRB 2816, GF: Dr. Johannes Loxen
http://www.sernet.de, mailto:kontakt at sernet.de


More information about the samba-technical mailing list