389ds / 389-ds-base

The enterprise-class Open Source LDAP server for Linux
https://www.port389.org/
Other
200 stars 82 forks source link

Issue 6207 - Random crash in test_long_rdn CI test #6215

Closed progier389 closed 3 weeks ago

progier389 commented 3 weeks ago

CI test indexes/test_long_rdn sometime crashes The issue is that a data returned by dblayer_bulk_nextdata iterator is wrongly freed The fix is to avoid freeing the data

Issue: #6207

Reviewed by: @droideck (Thanks!)

tbordaz commented 3 weeks ago

LGTM as well. Just a minor comment. Sometime the function _entryrdn_dup_rdn_elem is called before _entryrdn_resolve_redirect so that this later is called with '1' (canfree). For example here or here

In the opposite here or here

You may use the same way of calling everywhere.

progier389 commented 3 weeks ago

I agree it would make things more readable, but on the other side it will duplicate the rdn_elem when it is not really needed (then you will have to take care to free the duplicated data) and I would rather prefer to avoid stressing malloc/free when it is not useful.