Skip to content

Commit 3221c64

Browse files
Jiri Pirkodavem330
authored andcommitted
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 <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent 75db986 commit 3221c64

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/net/team/team.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1849,7 +1849,7 @@ static int team_nl_fill_port_list_get(struct sk_buff *skb,
18491849
goto nla_put_failure;
18501850
port_list = nla_nest_start(skb, TEAM_ATTR_LIST_PORT);
18511851
if (!port_list)
1852-
return -EMSGSIZE;
1852+
goto nla_put_failure;
18531853

18541854
list_for_each_entry(port, &team->port_list, list) {
18551855
struct nlattr *port_item;

0 commit comments

Comments
 (0)