ldb bug fixes

Adrian Cochrane adrianc at catalyst.net.nz
Mon Nov 23 20:15:36 UTC 2015


I am not aware of anywhere outside this function (which specifically 
errors out in the NULL case) that would have a problem with 
msg->elements being NULL. I'll send another variant of the patch 
shortly which sets msg->elements to that if it will please you.

On Mon, Nov 23, 2015 at 6:31 PM, Volker Lendecke 
<Volker.Lendecke at SerNet.DE> wrote:
> On Mon, Nov 23, 2015 at 02:35:38PM +1300, Adrian Cochrane wrote:
>>  It turns out that wouldn't be an easier fix because
>>  /lib/talloc/talloc_guide.txt specifically states:
>>  >  talloc_realloc(context, ptr, type, 0) ==> talloc_free(ptr);
>> 
>>  However I did take your advice and incorporated it into this updated
>>  patch.
> 
> Ok, I was confused by talloc_array vs talloc_realloc.
> 
> Question: Where in the code is msg->elements being NULL a
> problem? If msg->num_elements==0, why does someone look at
> msg->elements?
> 
> Thanks, Volker
> 
> --
> 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