summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorJiri Pirko <jpirko@redhat.com>2012-06-19 05:54:13 (GMT)
committerDavid S. Miller <davem@davemloft.net>2012-06-19 22:00:23 (GMT)
commit3221c64603d9843d8a28dfd8e678e46625d5d807 (patch)
tree2a191a7cea2e1128c10efdd6de3279b845f8b216 /drivers
parent75db986a6b93dd93e543387720b88f350ce38d30 (diff)
downloadlinux-3221c64603d9843d8a28dfd8e678e46625d5d807.tar.xz
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>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/net/team/team.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/team/team.c b/drivers/net/team/team.c
index 82ded18..e977f44 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;