svn commit: samba r25630 - in branches/SAMBA_4_0: .
source/lib/ldb/common
simo
idra at samba.org
Sun Oct 14 16:11:17 GMT 2007
On Sun, 2007-10-14 at 17:58 +0200, Jelmer Vernooij wrote:
> 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.
Yes, my is more a paranoia than anything else, mostly because valgrind
will have a harder time recognizing that a piece of memory is lost.
> > 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.
I agree for talloc, but this is ldb_dn() not talloc, I think we can put
different constraints if we think it is important.
If you actually need to be able to pass NULL, then I guess we can allow
it.
Simo.
--
Simo Sorce
Samba Team GPL Compliance Officer <simo at samba.org>
Senior Software Engineer at Red Hat Inc. <ssorce at redhat.com>
More information about the samba-technical
mailing list