svn commit: samba r20207 - in branches: SAMBA_3_0/source/nsswitch SAMBA_3_0_24/source/nsswitch

Jeremy Allison jra at samba.org
Sat Dec 16 05:03:16 GMT 2006


On Fri, Dec 15, 2006 at 11:34:39PM -0500, simo wrote:
> 
> I think the way print_sidlist() and sprintf_append() are coded up is
> very bad and misleading, I am sure it will be very easy to get them
> wrong again in future.
> 
> I had to read the code to find out with big surprise that passing NULL
> as mem_ctx does NOT in fact allocate on the NULL context but does a
> malloc, and so based on what you pass as mem_ctx you have to carefully
> decide whether to use talloc_free() or just a free().

FYI: I've just fixed sprintf_append() in SAMBA_3_0 and SAMBA_3_0_24
to only use the talloc varient, never the malloc (in line with the
other changes I've been making).

Jeremy.


More information about the samba-technical mailing list