[PATCH] Remove fstring from wb_acct_info
jra at samba.org
Wed Oct 31 22:36:49 UTC 2018
On Thu, Nov 01, 2018 at 11:25:20AM +1300, Andrew Bartlett wrote:
> However, my question is more: what is the lifetime for the output of
> centry_string() and ads_pull_username()?
> I think the centry_string() should be duplicated with tallco_strdup()
> (I dare not suggest talloc_reference) and ads_pull_username() brought
> over with talloc_steal().
centry_string() is doing a talloc_strdup onto the passed in
talloc context, which in this case is (*info) - the last
argument to centry_string is the context to copy onto.
Same for the ads_pull_username() and ads_pull_string()
calls (they're tallocing onto *info).
So the patch is always talloc'ing onto the owning info, which (IMHO) is
the correct thing to do.
More information about the samba-technical