mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-10-04 08:08:54 +00: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:
parent
ef78b8d5d6
commit
2a1f4fed39
1 changed files with 1 additions and 0 deletions
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue