[PATCH] Don't modify memory reference provided by value
swen at vnet.ibm.com
Tue Feb 6 08:48:50 UTC 2018
On Tue, 2018-02-06 at 21:45 +1300, Andrew Bartlett wrote:
> On Tue, 2018-02-06 at 09:40 +0100, Swen Schillig via samba-technical
> > Hi
> > Please review this very small patch.
> > Thanks in advance.
> To be clear, what this is doing is just the same as talloc_steal(),
> which is widely used elsewhere in the code.
> I don't know if that is what is meant here, or if a memdump is more
> appropriate, but wanted to fill in some background.
Correct, a talloc_steal would at least not try to zero the reference,
but still, the access of the memory by caller afterwards
would still be "wrong" as it cannot be assumed it is still available.
More information about the samba-technical