Skip to content

Commit

Permalink
team: fix error path in team_nl_fill_port_list_get()
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Jiri Pirko authored and David S. Miller committed Jun 19, 2012
1 parent 75db986 commit 3221c64
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/net/team/team.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 3221c64

Please sign in to comment.