mirror of
https://github.com/torvalds/linux.git
synced 2026-05-24 23:22:31 +02:00
net: shaper: set ret to -ENOMEM when genlmsg_new() fails in group_doit
genlmsg_new() alloc failure path in net_shaper_nl_group_doit() forgets
to set ret before jumping to error handling.
Fixes: 5d5d4700e7 ("net-shapers: implement NL group operation")
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Link: https://patch.msgid.link/20260510192904.3987113-6-kuba@kernel.org
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
This commit is contained in:
parent
6e8ae9d805
commit
8054f85b83
|
|
@ -1276,8 +1276,10 @@ int net_shaper_nl_group_doit(struct sk_buff *skb, struct genl_info *info)
|
|||
* rollback on allocation failure.
|
||||
*/
|
||||
msg = genlmsg_new(net_shaper_handle_size(), GFP_KERNEL);
|
||||
if (!msg)
|
||||
if (!msg) {
|
||||
ret = -ENOMEM;
|
||||
goto free_leaves;
|
||||
}
|
||||
|
||||
hierarchy = net_shaper_hierarchy_setup(binding);
|
||||
if (!hierarchy) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user