[QUICK] talloc bugs

Rusty Russell rusty at rustcorp.com.au
Sat Jun 27 01:39:26 MDT 2009

On Sat, 27 Jun 2009 12:04:38 am Sam Liddicott wrote:
> * simo wrote, On 26/06/09 15:17:
> > Simpler method, DON'T mix talloc_steal and talloc_reference usage.
> True. Are you going to put that into the talloc docs?
> I'd be ashamed to that for the sake of simplicity.
> Especially when it really means "don't use talloc_steal when writing an
> add-on module to a program if you think that someone else, right now,
> might be writing an add-on module to the same program which uses
> talloc_reference".

Since you shouldn't mix talloc_reference and talloc_free either, the trend 
seems to be "don't use talloc_reference".

That was my conclusion a couple of years ago when I played with this; see 
"Talloc: References Considered Harmful?" 


More information about the samba-technical mailing list