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:
Bjoern A. Zeeb 2016-04-09 09:24:05 +00:00
parent 2b8b8ae8e7
commit 029f99dcc4

View File

@ -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);
}