spoolss talloc problem

tridge at samba.org tridge at samba.org
Mon Aug 8 02:42:16 MDT 2011

Hi Simo,

I finally got the problem reproduced, and spent a few hours on it
today. I eventually concluded that the problem is that the sibling
list becomes invalid during a recursive free, and that is why finding
the parent gives a valgrind error.

The fix I'm testing at the moment is very simple:


it just ensures that a talloc chunk that is part way through being
freed doesn't have an invalid tc->prev pointer.

I'm still testing the fix, but it does seem to fix your issue. It is
also faster than the existing code (as we no longer call the expensive
talloc_parent_chunk() call when we don't need it).

Please test.

Cheers, Tridge

More information about the samba-technical mailing list