#50506 Replace slapi_entry_attr_get_charptr() with slapi_fetch_attr()
Closed: wontfix by mreynolds. Opened by mreynolds.

Issue Description

There has been a pattern/habit in the code of using slapi_entry_attr_get_charptr() to get an attribute value, but this function strdup's the entry's attribute value. In almost all cases the slapi_entry_attr_get_charptr() value is freed right away - it is not consumed. This is causing unnecessary malloc/free's which adds to fragmentation and hurts performance. Instead, if the attribute value is not consumed we should use slapi_fetch_attr() instead, which just grabs a pointer to the attribute value.


Metadata Update from @mreynolds:
- Issue assigned to mreynolds

https://pagure.io/389-ds-base/pull-request/50519

Metadata Update from @mreynolds:
- Custom field origin adjusted to None
- Custom field reviewstatus adjusted to None
- Issue set to the milestone: 1.4.1

Commit a593f3d0 relates to this ticket

Metadata Update from @mreynolds:
- Issue close_status updated to: fixed
- Issue status updated to: Closed (was: Open)

Missed a few frees:

https://pagure.io/389-ds-base/pull-request/50524

Commit 4b240e96 relates to this ticket

suites/clu/clu_test.py::test_clu_pwdhash_mod fails after this change.

pwdhash doesn't respect the passwordStorageScheme defined in cn=config

Metadata Update from @vashirov:
- Issue status updated to: Open (was: Closed)

Commit e3780926 relates to this ticket

Metadata Update from @mreynolds:
- Issue close_status updated to: fixed
- Issue status updated to: Closed (was: Open)

additional fix: https://pagure.io/389-ds-base/pull-request/50597

389-ds-base is moving from Pagure to Github. This means that new issues and pull requests
will be accepted only in 389-ds-base's github repository.

This issue has been cloned to Github and is available here:
- https://github.com/389ds/389-ds-base/issues/3562

If you want to receive further updates on the issue, please navigate to the github issue
and click on subscribe button.

Thank you for understanding. We apologize for all inconvenience.

Metadata Update from @spichugi:
- Issue close_status updated to: wontfix (was: fixed)

Metadata
Related Pull Requests