Two talloc hierarchy things in Samba4

tridge at tridge at
Wed Nov 23 00:37:39 GMT 2005


 > I just don't see where they come from. Do you have any idea?

yes, I reproduced this and found it was a problem with the fact that
the packet code needed to use the packet context after calling the
user supplied callback. If the callback freed the packet context then
we ended up using a freed variable.

The fix I used was to have a talloc destructor on the packet context
that 'refused' the talloc_free() when the packet context is busy
processing a request. This is the first time we've used the feature
that a destructor can return -1 to refuse a free. I don't think we
should go wild with this talloc feature, but it seems to be the best
solution in this case.

Cheers, Tridge

More information about the samba-technical mailing list