Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 2837
b: refs/heads/master
c: 68d3187
h: refs/heads/master
i:
  2835: 31b6a3a
v: v3
  • Loading branch information
James Lamanna authored and David S. Miller committed Jun 23, 2005
1 parent 3ebfc57 commit d9173c0
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 15 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: 285b3afefacff14bc98e5754b8b48a0a2b42f0df
refs/heads/master: 68d318720052154bc6b2513b0f15d0d947cc53c9
21 changes: 7 additions & 14 deletions trunk/net/bridge/netfilter/ebtables.c
Original file line number Diff line number Diff line change
Expand Up @@ -859,8 +859,7 @@ static int translate_table(struct ebt_replace *repl,
if (repl->valid_hooks & (1 << i))
if (check_chainloops(newinfo->hook_entry[i],
cl_s, udc_cnt, i, newinfo->entries)) {
if (cl_s)
vfree(cl_s);
vfree(cl_s);
return -EINVAL;
}

Expand All @@ -883,8 +882,7 @@ static int translate_table(struct ebt_replace *repl,
EBT_ENTRY_ITERATE(newinfo->entries, newinfo->entries_size,
ebt_cleanup_entry, &i);
}
if (cl_s)
vfree(cl_s);
vfree(cl_s);
return ret;
}

Expand Down Expand Up @@ -1030,8 +1028,7 @@ static int do_replace(void __user *user, unsigned int len)
}
vfree(table);

if (counterstmp)
vfree(counterstmp);
vfree(counterstmp);
return ret;

free_unlock:
Expand All @@ -1040,20 +1037,17 @@ static int do_replace(void __user *user, unsigned int len)
EBT_ENTRY_ITERATE(newinfo->entries, newinfo->entries_size,
ebt_cleanup_entry, NULL);
free_counterstmp:
if (counterstmp)
vfree(counterstmp);
vfree(counterstmp);
/* can be initialized in translate_table() */
if (newinfo->chainstack) {
for (i = 0; i < num_possible_cpus(); i++)
vfree(newinfo->chainstack[i]);
vfree(newinfo->chainstack);
}
free_entries:
if (newinfo->entries)
vfree(newinfo->entries);
vfree(newinfo->entries);
free_newinfo:
if (newinfo)
vfree(newinfo);
vfree(newinfo);
return ret;
}

Expand Down Expand Up @@ -1213,8 +1207,7 @@ void ebt_unregister_table(struct ebt_table *table)
down(&ebt_mutex);
LIST_DELETE(&ebt_tables, table);
up(&ebt_mutex);
if (table->private->entries)
vfree(table->private->entries);
vfree(table->private->entries);
if (table->private->chainstack) {
for (i = 0; i < num_possible_cpus(); i++)
vfree(table->private->chainstack[i]);
Expand Down

0 comments on commit d9173c0

Please sign in to comment.