svn commit: samba r16831 - in branches/SAMBA_4_0/source/dsdb/samdb/ldb_modules: .

Andrew Bartlett abartlet at samba.org
Thu Jul 6 12:58:08 GMT 2006


On Thu, 2006-07-06 at 08:17 -0400, simo wrote:
> On Thu, 2006-07-06 at 06:04 +0000, abartlet at samba.org wrote:
> > Author: abartlet
> > Date: 2006-07-06 06:04:06 +0000 (Thu, 06 Jul 2006)
> > New Revision: 16831
> > 
> > WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=16831
> > 
> > Log:
> > Use a valid memory context (found by the IBM checker).
> 
> [...]
> 
> > -		ldb_set_errstring(module->ldb, talloc_asprintf(module, "samldb_notice_sid: error searching to see if sid %s is in use: %s\n", 
> > -							       dom_sid_string(dom_res, sid), 
> > +		ldb_set_errstring(module->ldb, talloc_asprintf(mem_ctx, "samldb_notice_sid: error searching to see if sid %s is in use: %s\n", 
> > +							       dom_sid_string(mem_ctx, sid), 
> 
> 
> module is a valid memory context afaik, are you sure the IBM checker
> understands talloc ?

But dom_res is not (at this point it is uninitialised), and I figured
mem_ctx was the correct place for the scratch memory (it is stolen by
ldb_set_errstring()).

Andrew Bartlett

-- 
Andrew Bartlett                                http://samba.org/~abartlet/
Authentication Developer, Samba Team           http://samba.org
Student Network Administrator, Hawker College  http://hawkerc.net
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
Url : http://lists.samba.org/archive/samba-technical/attachments/20060706/fa40c018/attachment.bin


More information about the samba-technical mailing list