forked from Minki/linux
net/prestera: Fix devlink groups leakage in error flow
Devlink trap group is registered but not released in error flow,
add the missing devlink_trap_groups_unregister() call.
Fixes: 0a9003f45e
("net: marvell: prestera: devlink: add traps/groups implementation")
Signed-off-by: Leon Romanovsky <leonro@nvidia.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
06f5553e0f
commit
13a9c4ac31
@ -530,6 +530,8 @@ err_trap_register:
|
||||
prestera_trap = &prestera_trap_items_arr[i];
|
||||
devlink_traps_unregister(devlink, &prestera_trap->trap, 1);
|
||||
}
|
||||
devlink_trap_groups_unregister(devlink, prestera_trap_groups_arr,
|
||||
groups_count);
|
||||
err_groups_register:
|
||||
kfree(trap_data->trap_items_arr);
|
||||
err_trap_items_alloc:
|
||||
|
Loading…
Reference in New Issue
Block a user