[PATCH] cleanup in passdb

Volker Lendecke Volker.Lendecke at SerNet.DE
Tue Nov 18 08:38:54 MST 2014


On Tue, Nov 18, 2014 at 03:50:40PM +0100, Kamen Mazdrashki wrote:
> Out of curiosity - why is the first change needed?
> I guess talloc_pooled_object() allocated pool is going to give us some
> performance boost
> during memory allocation/deallocation?

It's not needed. It only does one malloc for the whole object. So the
hope is that it's faster. But it also makes sure that if you get the
length calculation right it will never fail the suballocations. The
alternative patch would be to add NULL checks to all talloc_strdup calls.

With best regards,

Volker Lendecke

-- 
SerNet GmbH, Bahnhofsallee 1b, 37081 Göttingen
phone: +49-551-370000-0, fax: +49-551-370000-9
AG Göttingen, HRB 2816, GF: Dr. Johannes Loxen
http://www.sernet.de, mailto:kontakt at sernet.de


More information about the samba-technical mailing list