Add assertion to check that named object has correct type.
Obtained from: Yandex LLC MFC after: 1 week
This commit is contained in:
parent
270adb2182
commit
0df76496a6
@ -708,6 +708,8 @@ dyn_destroy(struct ip_fw_chain *ch, struct named_object *no)
|
|||||||
|
|
||||||
IPFW_UH_WLOCK_ASSERT(ch);
|
IPFW_UH_WLOCK_ASSERT(ch);
|
||||||
|
|
||||||
|
KASSERT(no->etlv == IPFW_TLV_STATE_NAME,
|
||||||
|
("%s: wrong object type %u", __func__, no->etlv));
|
||||||
KASSERT(no->refcnt == 1,
|
KASSERT(no->refcnt == 1,
|
||||||
("Destroying object '%s' (type %u, idx %u) with refcnt %u",
|
("Destroying object '%s' (type %u, idx %u) with refcnt %u",
|
||||||
no->name, no->etlv, no->kidx, no->refcnt));
|
no->name, no->etlv, no->kidx, no->refcnt));
|
||||||
|
Loading…
Reference in New Issue
Block a user