There is no need to erase hook->hk_node before freing hook.
This commit is contained in:
parent
c004f40325
commit
f573da1a0e
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=177722
@ -964,10 +964,8 @@ ng_unref_hook(hook_p hook)
|
||||
} while (! atomic_cmpset_int(&hook->hk_refs, v, v - 1));
|
||||
|
||||
if (v == 1) { /* we were the last */
|
||||
if (_NG_HOOK_NODE(hook)) { /* it'll probably be ng_deadnode */
|
||||
if (_NG_HOOK_NODE(hook)) /* it'll probably be ng_deadnode */
|
||||
_NG_NODE_UNREF((_NG_HOOK_NODE(hook)));
|
||||
hook->hk_node = NULL;
|
||||
}
|
||||
NG_FREE_HOOK(hook);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user