Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Problem: [zhashx] zhashx_dup() does not copy callbacks
The zhashx_dup() function does not duplicate the source hash perfectly. It does not duplicate the source hash's hasher function, as the well as the key destructor, duplicator, or comparator. This minimally can lead to unexpected behavior of the duplicate zhashx. At worst it can cause assert/segfault/memory corruption as zhashx defaults access/free unintended memory. Solution: Copy the source hasher, key destructor, key duplicator, and key comparator over to the newly duplicated zhashx. Fixes zeromq#2144
- Loading branch information