[PATCH] Tiny memory leak in lib/version.c
Volker.Lendecke at SerNet.DE
Sat Jan 19 18:39:15 GMT 2008
On Sat, Jan 19, 2008 at 03:14:45PM +0100, Corinna Vinschen wrote:
> while implementing the extra_info version stuff, it occured to me that
> samba_version_string() potentially allocates memory which is unused but
> never free'd.
It might be a bit pedantic, but in Samba3 we prefer
SAFE_FREE over free(). SAFE_FREE NULLs out after the free,
so re-using that pointer leads to a more direct segfault
rather than silent memory corruption.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Size: 189 bytes
Desc: not available
Url : http://lists.samba.org/archive/samba-technical/attachments/20080119/2da6d407/attachment.bin
More information about the samba-technical