Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 277905
b: refs/heads/master
c: 2bba19f
h: refs/heads/master
i:
  277903: 2f9dae9
v: v3
  • Loading branch information
Jiri Pirko authored and David S. Miller committed Nov 18, 2011
1 parent 4b4f286 commit 8970a78
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 234a8fd49d086f5a3debb379bfdf4e6b51f0c0e2
refs/heads/master: 2bba19fff8d09bf19df5d5e2de7188d65de67c3e
9 changes: 7 additions & 2 deletions trunk/drivers/net/team/team.c
Original file line number Diff line number Diff line change
Expand Up @@ -96,10 +96,13 @@ int team_options_register(struct team *team,
size_t option_count)
{
int i;
struct team_option *dst_opts[option_count];
struct team_option **dst_opts;
int err;

memset(dst_opts, 0, sizeof(dst_opts));
dst_opts = kzalloc(sizeof(struct team_option *) * option_count,
GFP_KERNEL);
if (!dst_opts)
return -ENOMEM;
for (i = 0; i < option_count; i++, option++) {
struct team_option *dst_opt;

Expand All @@ -119,12 +122,14 @@ int team_options_register(struct team *team,
for (i = 0; i < option_count; i++)
list_add_tail(&dst_opts[i]->list, &team->option_list);

kfree(dst_opts);
return 0;

rollback:
for (i = 0; i < option_count; i++)
kfree(dst_opts[i]);

kfree(dst_opts);
return err;
}

Expand Down

0 comments on commit 8970a78

Please sign in to comment.