Title: #977: sss_ptr_hash: internal refactoring
Thank you. It looks good to me. I have just some suggestions about
deleting items that might simplify the code more...
Thank you for the feedback.
The basic idea is to move `hash_delete` into
`sss_ptr_hash_value_destructor`. Would it be possible?
Then you could do the following changes:
* `sss_ptr_hash_delete` use lookup -> free(value) / calls hash_delete from cb
* `sss_ptr_hash_delete_all` - use `hash_values` instead of `hash_keys` and iterate
over values and just call `talloc_free(values)`
* `sss_ptr_hash_delete_cb` - `talloc_steal(NULL, value)` could be moved to
Do I understand correctly that idea is to assure that the only possible execution chain to
get into `sss_ptr_hash_delete_cb()` is:
**`talloc_free(sss_ptr_hash_value)`** `-> sss_ptr_hash_value_destructor() ->
(so that `sss_ptr_hash_delete_cb()` doesn't need to check if execution is/is not in
See the full comment at https://github.com/SSSD/sssd/pull/977#issuecomment-580773585