CVS update: samba4/source/torture

Andrew Bartlett abartlet at samba.org
Wed Feb 4 09:34:20 GMT 2004


On Wed, 2004-02-04 at 09:48, Stefan (metze) Metzmacher wrote:
> abartlet at samba.org wrote:
> 
> > Date:	Tue Feb  3 21:53:51 2004
> > Author:	abartlet
> > 
> > Update of /home/cvs/samba4/source/torture
> > In directory dp.samba.org:/tmp/cvs-serv16313/torture
> > 
> > Modified Files:
> > 	torture.c 
> > Log Message:
> > This would appear to restore smbtorture to be able to use the syntax
> > documented in it's self-help for RPC tests.
> 
> 
> what is with a:
> if (binding)
> 	free(binding);

I should have checked the parametric interface, to see if it copied the
string, but if it does, I'll free it.

> and a check if asprintf didn't fail.

So, we should check that a 20 byte allocation did not fail, at the start
of a client program?  If that fails, we have bigger problems.  That is
why I initialised the string

> I think in new code we should always check direcly a mallocing function 
> failed...

We quickly end up with more code to deal with allocation failures than
anything else.  

I'm starting to agree with tridge on this (and I'm normally in the
malloc-failure-check camp...)

Andrew Bartlett

-- 
Andrew Bartlett                                 abartlet at pcug.org.au
Manager, Authentication Subsystems, Samba Team  abartlet at samba.org
Student Network Administrator, Hawker College   abartlet at hawkerc.net
http://samba.org     http://build.samba.org     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/20040204/dfca74e3/attachment.bin


More information about the samba-technical mailing list