mirror of
https://github.com/edk2-porting/linux-next.git
synced 2025-01-14 00:24:15 +08:00
team: fix error path in team_nl_fill_port_list_get()
genlmsg_cancel() needs to be called in case nest fails Signed-off-by: Jiri Pirko <jpirko@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
75db986a6b
commit
3221c64603
@ -1849,7 +1849,7 @@ static int team_nl_fill_port_list_get(struct sk_buff *skb,
|
||||
goto nla_put_failure;
|
||||
port_list = nla_nest_start(skb, TEAM_ATTR_LIST_PORT);
|
||||
if (!port_list)
|
||||
return -EMSGSIZE;
|
||||
goto nla_put_failure;
|
||||
|
||||
list_for_each_entry(port, &team->port_list, list) {
|
||||
struct nlattr *port_item;
|
||||
|
Loading…
Reference in New Issue
Block a user