svn commit: samba r22509 - in branches: SAMBA_3_0/source/groupdb SAMBA_3_0_25/source/groupdb

Gerald (Jerry) Carter jerry at samba.org
Fri Apr 27 12:57:41 GMT 2007


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

James,

>> WebSVN:
>> http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=22509
>>
>> Log:
>> Fix some memory corruption caused by calling free()
>> on talloc()'d memory when adding/removing members
>> from Local Groups.
> 
> How about changing SAFE_FREE to prevent this sort of thing? eg.
> 
> #define SAFE_FREE(x) do { if ((x) != NULL) { \
>     SMB_ASSERT(!talloc_is_talloc_pointer(free)); free(x); x=NULL;} }
> while(0)

That will not crash but will potentially leak memory.  I'd rather
have the crash.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.3 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFGMfNFIR7qMdg1EfYRAjNQAJwLAyYHeu+6iubvw1nqEIj4uWfZ2QCglsGG
yH81xtsiMjvO6oXwU1BDsew=
=Xbq9
-----END PGP SIGNATURE-----


More information about the samba-technical mailing list