[Samba] ctdb error after upgrade to 4.12.10

Jeremy Allison jra at samba.org
Tue Nov 10 17:58:36 UTC 2020


On Tue, Nov 10, 2020 at 06:20:45PM +0100, Günther Deschner wrote:
> Hi Jeremy,
> 
> I'm afraid this is indeed caused by the talloc tidyup as one can perfectly
> reproduce it wih the following patch for smbtorture (call bin/smbtorture
> ncacn_np:lo local.file.file_lines_parse). I guess we need to set up some
> warning signs around file_lines_parse() expressing that it takes talloced
> content and that one should not free the separated lines array separately.

Dammit, I'm *so sorry* for that mistake. I looked quickly
at file_lines_parse() and saw it do the:

ret = talloc_zero_array(mem_ctx, char *, i+2);

but then missed the:

talloc_steal(ret, p);

below. That's a *horrible* internal API to
expose to callers.



More information about the samba mailing list