Use after talloc_free...

Kai Blin kai at
Wed Nov 11 04:33:29 MST 2009

On Wednesday 11 November 2009 11:39:59 Rusty Russell wrote:
> On Wed, 11 Nov 2009 06:44:34 pm Volker Lendecke wrote:
> > On Wed, Nov 11, 2009 at 06:40:14PM +1030, Rusty Russell wrote:
> > > Two recent CTDB fixes (1cbf06a126621 and eda052101728cf) both fixed
> > > obvious use-after-free bugs[1].  This has convinced me that something
> > > like SAFE_FREE would be nice in talloc.
> >
> > We have TALLOC_FREE in Samba3 for ages.
> Exactly!  That was my "something like SAFE_FREE" reference.  But YELLING is
> not an appealing coding style, nor do I like the magic NULL-setting which
> I've found that people rely on.  I'd rather see an explicit NULL set if
> it's required.

TALLOC_FREE is used in the shared code already. Why come up with yet another 
way to do it(tm)? Personally I think coding on Samba is complicated enough 

Just my 2 cents,

Kai Blin
WorldForge developer
Wine developer
Samba team member
Will code for cotton.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part.
URL: <>

More information about the samba-technical mailing list