LDB hidden memory leaks
abartlet at samba.org
Mon Jul 12 18:17:45 MDT 2010
On Tue, 2010-07-13 at 02:43 +0300, Kamen Mazdrashki wrote:
> On Tue, Jul 13, 2010 at 01:10, simo <idra at samba.org> wrote:
> Even if it were I would not be thrilled by such a change.
> Why you pass an argument is clear as soon as you look at the
> definition of the function you are calling.
> This is exactly what I want to avoid, right :)
> Forcing TALLOC_CTX* explicit cast may be implemented
> with compile time warnings - we just need to re-typedef TALLOC_CTX.
> Look what a patch I got this way:
I don't see how that patch would change anything in terms of the
warnings, but in terms of self-documenting code, this is a change that
should be applied. The void * here comes from an earlier time in ldb
when it did not always have to use talloc(). This particular oddity was
done away with a long time ago.
Anyway, your patch is good, the TALLOC_CTX * is still a void *, but at
least now the programmer has a better clue as to what it is used for.
However, we can't change TALLOC_CTX * from void * without breaking the
Andrew Bartlett http://samba.org/~abartlet/
Authentication Developer, Samba Team http://samba.org
Samba Developer, Cisco Inc.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Size: 190 bytes
Desc: This is a digitally signed message part
More information about the samba-technical