LDB hidden memory leaks

Andrew Bartlett abartlet at samba.org
Mon Jul 19 01:40:49 MDT 2010

On Fri, 2010-07-16 at 14:41 +0300, Kamen Mazdrashki wrote:
> Hi Tridge,
> I've updated the branch according to your comments.
> http://gitweb.samba.org/?p=kamenim/samba.git;a=shortlog;h=refs/heads/ldb-mem-fix

I've pushed this. 

> P.S. While updating function prototype, I realized that having
> a mechanism like TC(param) or (TALLOC_CTX*)param is not
> just visual aid but may be quite useful when copy&paste or 
> refactoring code also ;)
> For full effect we will have to redefine TALLOC_CTX to something like
> typedef void* TALLOC_CTX;
> or
> typedef struct {int unused;} TALLOC_CTX;
> so compiler warns we need to cast.
> It should not brake ABI as it stays in ptr_size size :)

I know there are hacks that can work, but I'm still sceptical as to
putting in compulsory casts all over the code.  Casts often hide bugs,
and in this case would change the API, if not the ABI. 

I agree we will sort out some suitable marker, I'm just not sure what it
should be, and we will have to make it a general policy, or else we just
end up with a patchwork. 

Andrew Bartlett

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
Type: application/pgp-signature
Size: 190 bytes
Desc: This is a digitally signed message part
URL: <http://lists.samba.org/pipermail/samba-technical/attachments/20100719/b7d781d0/attachment.pgp>

More information about the samba-technical mailing list