1
0
mirror of https://git.FreeBSD.org/src.git synced 2025-01-11 14:10:34 +00:00

Don't use data after free.

Found by:	Coverity Prevent
CID:		536
Submitted by:	harti (via vs)
This commit is contained in:
Alexander Leidinger 2006-09-30 12:37:43 +00:00
parent 85213a8004
commit 63272d3036
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=162849

View File

@ -879,6 +879,7 @@ ng_ccatm_disconnect(hook_p hook)
node_p node = NG_HOOK_NODE(hook);
struct ccnode *priv = NG_NODE_PRIVATE(node);
struct cchook *hd = NG_HOOK_PRIVATE(hook);
struct ccdata *cc;
if (hook == priv->dump) {
priv->dump = NULL;
@ -893,12 +894,14 @@ ng_ccatm_disconnect(hook_p hook)
else
cc_user_destroy(hd->inst);
cc = hd->node->data;
free(hd, M_NG_CCATM);
NG_HOOK_SET_PRIVATE(hook, NULL);
priv->hook_cnt--;
cc_work(hd->node->data);
cc_work(cc);
}
/*