talloc_tos(), returning talloc_tos() memory and the talloc_stackframe order protection
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
> 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.
could you create a patch for that to explain the limitation in the code? Using
a doxygen function comment?
Andreas Schneider asn at samba.org
Samba Team www.samba.org
More information about the samba-technical