ERROR: talloc_free with references at ../source4/libcli/raw/rawrequest.c:77
abartlet at samba.org
Thu Oct 13 15:35:58 MDT 2011
On Thu, 2011-10-13 at 16:23 +0100, Sam Liddicott wrote:
> I'm getting lots of:
> ERROR: talloc_free with references at ../source4/libcli/raw/rawrequest.c:77
> I know the history behind this (and lets not go there) but is it really
> an error?
> As far as I can tell no harm will come and the memory will be freed...
> but ERROR is a bold descriptor, so I thought I'd check.
> I could set req->do_not_free, but then it wouldn't get freed at all;
> whereas I really just want to extend the life of the creq
The correct fix is to talloc_unlink() rather than talloc_free() at the
point indicated by the error. That way, the correct parent is removed,
and the remaining reference promoted.
The challenge is that you need to know the original parent - you can ask
for talloc_parent(), but that of course reintroduces the ambiguity.
Andrew Bartlett http://samba.org/~abartlet/
Authentication Developer, Samba Team http://samba.org
More information about the samba-technical