talloc_tos(), returning talloc_tos() memory and the talloc_stackframe order protection

Andreas Schneider asn at samba.org
Fri Jun 22 06:15:44 UTC 2018


On Friday, 22 June 2018 07:36:38 CEST Stefan Metzmacher via samba-technical 
wrote:
> This is a special case! The code we had before was much worse
> it created connection_struct which did sometime chdir and forgot to
> chdir back and call VFS_DISCONNECT when done.
> 
> create_conn_struct_[cwd]_tos() is now only usable in one code block
> that starts with frame = talloc_stackframe() and ends with
> TALLOC_FREE(frame). This implements a restriction similar to
> become_root()/unbecome_root() which always be used as pair
> wrapping a specific shortterm section.

Metze,

could you create a patch for that to explain the limitation in the code? Using 
a doxygen function comment?


Thanks,


	Andreas

-- 
Andreas Schneider                      asn at samba.org
Samba Team                             www.samba.org
GPG-ID:     8DFF53E18F2ABC8D8F3C92237EE0FC4DCC014E3D





More information about the samba-technical mailing list