ldb_dn_copy(): should we take a talloc_reference?

Jeremy Allison jra at samba.org
Tue Feb 13 19:47:18 UTC 2018


On Tue, Feb 13, 2018 at 08:50:40AM +0100, Volker Lendecke wrote:
> On Mon, Feb 12, 2018 at 11:48:47AM -0800, Jeremy Allison wrote:
> > If you have to reference count, add an explicit reference
> > counter.
> 
> There's one use of talloc_reference that that I would defend: It's in
> tdb_wrap. There it's impossible that anybody outside of this small
> piece of code can be affected. The alternative would have been an
> explicit refcount, but that has its complexities too. If you confine
> it like tdb_wrap does, it is essentially an explicit refcount with
> other means.

Yes I know about that one. You and I have discussed it
before :-). If we could constrain talloc_reference()
to just this kind of usage I wouldn't have such a
violent reaction. Unfortunately it has historically
not been so contrained :-(.



More information about the samba-technical mailing list