Re: svn commit: samba r23290 - in branches: SAMBA_3_0/source/nsswitch SA
Re: svn commit: samba r23290 - in branches: SAMBA_3_0/source/nsswitch SAMBA_3_0_26/source/nsswitch
"Gerald (Jerry) Carter"
Fri, 01 Jun 2007 22:02:30 -0500
-----BEGIN PGP SIGNED MESSAGE-----
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.
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
The moral of the story is "Don't mix malloc and
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.4 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
-----END PGP SIGNATURE-----