[PATCH] Add stackframes to public libsmbclient functions

Derrell Lipman derrell.lipman at unwireduniverse.com
Mon Nov 19 15:50:43 GMT 2007

On Nov 19, 2007 10:38 AM, Gerald (Jerry) Carter <jerry at samba.org> wrote:
> The talloc_stackframe() is a good idiom in my opion for
> (a) removing the short lived tmp_ctx pointers that are needed
>     randomly throughout the code.
> (b) Allowing a caller to ensure that all short lived temp
>     contexts are correctly cleaned up.

Rather than calling a stackframe function that returns a value (which
is otherwise unused at the higher layer) and puts magic on a stack,
why not just use that value by passing it down to the lower layer for
use as a temporary context?  Wouldn't that be a cleaner

libsmbclient is a small part of Samba.  If having libsmbclient
allocate and free those stackframes really and truly helps the
lower-layer functionality, I won't be stubborn about this.  I'd sure
rather, though, provide input towards what I feel would be a cleaner



More information about the samba-technical mailing list