[PATCH] new macro: talloc_ctxdup
abartlet at samba.org
Mon Apr 30 23:24:32 MDT 2012
On Mon, 2012-04-30 at 14:11 -0700, Jeremy Allison wrote:
> On Mon, Apr 30, 2012 at 07:08:14PM +0200, Pavel Březina wrote:
> > Hi,
> > I'm sending a small patch that adds talloc_ctxdup(parent, context). It
> > is an equivalent to the existing talloc_memdup() but it duplicates a
> > talloc context and keeps its name.
> What use do you have for such a thing ?
Additionally, I'm concerned that doing this in talloc (rather than in
local macros with clear purpose) may be confusing with regards to the
talloc tree. This new talloc object would be a duplicate in name, and
in memory, but would not have duplicate children - which if this is a
struct, may be pointer elements in that struct.
Andrew Bartlett http://samba.org/~abartlet/
Authentication Developer, Samba Team http://samba.org
More information about the samba-technical