[QUICK] talloc bugs

Sam Liddicott sam at liddicott.com
Wed Jul 1 11:26:48 GMT 2009

* Sam Liddicott wrote, On 01/07/09 12:21:
> So there is no patch to remove talloc_free, we just re-frame talloc
> and watch the ambiguity and conflict vanish in this newly framed
> talloc which happens to be suspiciously like the old talloc apart from
> a patch which prevents the ambiguity introducing promotion from "equal
> reference" to "parent" - because now "parent" doesn't mean parent in
> the old talloc v0.1 sense, it means "allocating reference saved for
> the convenience for backwards compatible talloc_free" and has no
> hierarchical meaning whatsoever. All the hierchy is kept in tc->refs
Except of course when we recognize that it should be forbidden to have
the convenient tc->parent hold a value which is not also in tc->refs, we
realise that we don't actually have to go to the trouble of a patch to
stash the parent in tc->refs, but we can treat parent as a "cached"
first-entry in tc->refs - just as we do now! So current code just
becomes a slightly optimized implementation of the egalitarian talloc.
We just have to stop promoting refs to parent when the parent goes away.


More information about the samba-technical mailing list