resets 'first' when esize == 0 You can view, comment on, or merge this pull request online at:
https://github.com/kamailio/kamailio/pull/1142
-- Commit Summary --
* htable: fix crash if deleted entry is reused
-- File Changes --
M src/modules/htable/ht_api.c (14)
-- Patch Links --
https://github.com/kamailio/kamailio/pull/1142.patch https://github.com/kamailio/kamailio/pull/1142.diff
@lazedo - I am not sure be46742 is actually effective and fixes anything -- `first` should become NULL if the last item in the slot (entry) is removed, because it->next should be NULL at that moment.
Can you describe what was the issue you faced? Maybe the problem is in another part and it->next is wrong, but that will have bad effects in other cases.
The commit 18ba95a seems ok.
@miconda thanks for the comment. i think you're right. i re-tested with only the second commit and it seems to be working.
@lazedo - ok, thanks for the feedback and fix! You can merge that commit and backport as needed to stable branches.
Merged #1142.
@miconda backported to 4.4 and 5.0