svn commit: samba r25630 - in branches/SAMBA_4_0: . source/lib/ldb/common

Jelmer Vernooij jelmer at samba.org
Sun Oct 14 15:58:31 GMT 2007


On Sun, 2007-10-14 at 11:46 -0400, simo wrote:
> On Sun, 2007-10-14 at 15:12 +0000, jelmer at samba.org wrote:
> > Log:
> > Allow "NULL" as memory context, for consistency with the rest of the
> > code, 
> > which also does.
> A NULL context is dangerous because it leads quickly to memory leaks
> hanged on the top context.
In general, I agree. In my case, the DN is owned by a python object that
will explicitly call talloc_free() for it. 

> When building an ldb_dn we should really not allow a NULL context imo.
We should be consistent in how we handle NULL for talloc contexts.
Either talloc should freak out when it gets NULL passed or we should
allow NULL everywhere. 

Cheers,

Jelmer

-- 
Jelmer Vernooij <jelmer at samba.org> - http://samba.org/~jelmer/
Jabber: jelmer at jabber.fsfe.org


More information about the samba-technical mailing list