[PATCH] LDB: Redudant test on NULL context remove

Michael Adam obnox at samba.org
Thu Mar 24 16:13:39 UTC 2016

On 2016-03-22 at 12:54 +0100, Pavel Březina wrote:
> On 03/21/2016 02:52 PM, Petr Cech wrote:
> >Hi list,
> >
> >I have found something during work on SSSD stuff which looks like little
> >bug or bad intention.
> >
> >I would like to ask you for careful review of this situation. You could
> >see more information in head of attached patch.
> >
> >Regards
> The issue here is that even though using NULL as a talloc context is
> perfectly fine, ldb_dn_new_fmt won't accept is.

Right, and this may be by design, or by oversight.
Using NULL as talloc-context may result in leaking memory
(depending on the caller's further behaviour).
I can only speculate here about the intentions.

Simo introduced the check in commmit

So he might comment. Other than that, I'd see Andrew and
Metze as two more canoncial candidates to review this.

Thanks - Michael
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: not available
URL: <http://lists.samba.org/pipermail/samba-technical/attachments/20160324/d4772ddc/signature.sig>

More information about the samba-technical mailing list