mirror of
https://github.com/opnsense/src.git
synced 2026-06-11 09:41:03 -04:00
Make the KASSERT message in hash destroy more informative.
While the pointer might not be too helpful, the malloc type might at least give a good hint about which hashtbl we are talking. MFC after: 2 weeks Sponsored by: The FreeBSD Foundation Reviewed by: gnn, emaste Differential Revision: https://reviews.freebsd.org/D5802
This commit is contained in:
parent
2b8b8ae8e7
commit
029f99dcc4
1 changed files with 2 additions and 1 deletions
|
|
@ -93,7 +93,8 @@ hashdestroy(void *vhashtbl, struct malloc_type *type, u_long hashmask)
|
|||
|
||||
hashtbl = vhashtbl;
|
||||
for (hp = hashtbl; hp <= &hashtbl[hashmask]; hp++)
|
||||
KASSERT(LIST_EMPTY(hp), ("%s: hash not empty", __func__));
|
||||
KASSERT(LIST_EMPTY(hp), ("%s: hashtbl %p not empty "
|
||||
"(malloc type %s)", __func__, hashtbl, type->ks_shortdesc));
|
||||
free(hashtbl, type);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue