From: Jiri Pirko Date: Tue, 19 Jun 2012 05:54:13 +0000 (+0000) Subject: team: fix error path in team_nl_fill_port_list_get() X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=3221c64603d9843d8a28dfd8e678e46625d5d807;p=linux-beck.git 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 Signed-off-by: David S. Miller --- diff --git a/drivers/net/team/team.c b/drivers/net/team/team.c index 82ded1820caf..e977f440c378 100644 --- a/drivers/net/team/team.c +++ b/drivers/net/team/team.c @@ -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;