svn commit: samba r23290 - in
branches: SAMBA_3_0/source/nsswitch SAMBA_3_0_26/source/nsswitch
Gerald (Jerry) Carter
jerry at samba.org
Sat Jun 2 03:02:30 GMT 2007
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Jeremy Allison wrote:
> Personally I think it's just a style thing.
>
> I am wary of the "any pointer is a talloc
> pointer" idiom as it's easy to screw up
> when you have a mixture of malloc and
> talloc pointers. So I tend to explicitly
> use the top-level context to remind me.
Jeremy,
It's is better IMO to use the correct context pointer
so that in this case you can free the array
witout worrying about it the mem_ctx point is freed
I think Michael's original code is correct.
For example, this is how the struct samu* stuff
is done.
The moral of the story is "Don't mix malloc and
talloc".
cheers, jerry
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.4 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iD8DBQFGYN3FIR7qMdg1EfYRAvkmAJ4yx931wCFC2Kg1cZE5GSnIvM1WJQCfQS8Q
6DKWGKylR2jt0NjBDxT0idQ=
=jr70
-----END PGP SIGNATURE-----
More information about the samba-technical
mailing list