In conntrack hashtable each conntrack entry has two keys pointing to it. (Flow 5-Tuple and Inverted Flow 5-Tuple)
Therefore a better approach to delete the conntrack entry is to reference count for each pointing hashtable key and
delete the conntrack entry only when there arent any keys pointing to it.
Current approach tried to delete the both keys at once when the conntrack entry was supposed to be deleted. This caused double free under some circumstances.
In conntrack hashtable each conntrack entry has two keys pointing to it. (Flow 5-Tuple and Inverted Flow 5-Tuple) Therefore a better approach to delete the conntrack entry is to reference count for each pointing hashtable key and delete the conntrack entry only when there arent any keys pointing to it.
Current approach tried to delete the both keys at once when the conntrack entry was supposed to be deleted. This caused double free under some circumstances.
Fixes #583 Probably related to #513