LDB hidden memory leaks

Kamen Mazdrashki kamenim at samba.org
Mon Jul 12 17:43:11 MDT 2010


On Tue, Jul 13, 2010 at 01:10, simo <idra at samba.org> wrote:

> On Tue, 2010-07-13 at 08:05 +1000, Andrew Bartlett wrote:
> > On Mon, 2010-07-12 at 16:56 +0300, Kamen Mazdrashki wrote:
> >
> > >
> > > So, my question is (are):
> > > 1. what do you thing about enforcing TALLOC_CTX casting to
> > > be explicit?
> > > 2. and if everyone agrees it is 'good thing', then is it feasible to
> > > force
> > >     callers to explicitly cast pointers to TALLOC_CTX* where used?
> >
> > TALLOC_CTX is just void * in disguise, so no, it's not possible.
>
> Even if it were I would not be thrilled by such a change.
> Why you pass an argument is clear as soon as you look at the function
> definition of the function you are calling.


This is exactly what I want to avoid, right :)

Forcing TALLOC_CTX* explicit cast may be implemented
with compile time warnings - we just need to re-typedef TALLOC_CTX.
Look what a patch I got this way:
http://gitweb.samba.org/?p=kamenim/samba.git;a=commitdiff;h=6a3aaa1197950d16bb623c26f910347bb1fceb83


-- 
CU,
Kamen


More information about the samba-technical mailing list