talloc_tos() in common code

tridge at samba.org tridge at samba.org
Wed Apr 13 17:15:09 MDT 2011


Hi Metze,

 > I wonder why we can't use the talloc_tos() infrastructure in common code?

One of the main problems is it getting into public interfaces. A lot
of our common code is used by external projects (both via libsmbclient
and openchange usage). If we used talloc_tos() in any call that is
exposed publicly then those projects would need a mechanism for
cleaning up the allocation.

Either that or we would need to have a cleanup routine in every exit
point from our public API calls. There are a lot of those! If we miss
one, then we will have created a memory leak in an external project.

Cheers, Tridge


More information about the samba-technical mailing list