Use after talloc_free...

Rusty Russell rusty at
Wed Nov 11 03:39:59 MST 2009

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

So if we're going to promote this in talloc, I'd like to do it differently...


More information about the samba-technical mailing list