mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-07 19:30:30 +09:00
net/mlx5e: Warn when destroying mod hdr hash table that is not empty
To avoid memory leaks add a warn when destroying mod hdr hash table but the hash table is not empty. Signed-off-by: Roi Dayan <roid@nvidia.com> Reviewed-by: Maor Dickman <maord@nvidia.com> Signed-off-by: Saeed Mahameed <saeedm@nvidia.com>
This commit is contained in:
committed by
Saeed Mahameed
parent
ef78b8d5d6
commit
2a1f4fed39
@@ -47,6 +47,7 @@ void mlx5e_mod_hdr_tbl_init(struct mod_hdr_tbl *tbl)
|
||||
|
||||
void mlx5e_mod_hdr_tbl_destroy(struct mod_hdr_tbl *tbl)
|
||||
{
|
||||
WARN_ON(!hash_empty(tbl->hlist));
|
||||
mutex_destroy(&tbl->lock);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user