* [KJ] [PATCH] [14/29] ebtables.c - vfree() checking cleanups
@ 2005-01-04 21:57 jlamanna
0 siblings, 0 replies; only message in thread
From: jlamanna @ 2005-01-04 21:57 UTC (permalink / raw)
To: kernel-janitors
[-- Attachment #1: Type: text/plain, Size: 1718 bytes --]
ebtables.c vfree() checking cleanups.
Signed-off by: James Lamanna <jlamanna@gmail.com>
ebtables.c | 21 +++++++--------------
1 files changed, 7 insertions(+), 14 deletions(-)
--- linux-2.6.10-vanilla/net/bridge/netfilter/ebtables.c 2004-12-24 13:34:30.000000000 -0800
+++ linux-2.6.10/net/bridge/netfilter/ebtables.c 2005-01-04 11:17:43.823802384 -0800
@@ -858,8 +858,7 @@
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;
}
@@ -882,8 +881,7 @@
EBT_ENTRY_ITERATE(newinfo->entries, newinfo->entries_size,
ebt_cleanup_entry, &i);
}
- if (cl_s)
- vfree(cl_s);
+ vfree(cl_s);
return ret;
}
@@ -1029,8 +1027,7 @@
}
vfree(table);
- if (counterstmp)
- vfree(counterstmp);
+ vfree(counterstmp);
return ret;
free_unlock:
@@ -1039,8 +1036,7 @@
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 @@ -1048,11 +1044,9 @@
vfree(newinfo->chainstack);
}
free_entries:
- if (newinfo->entries)
- vfree(newinfo->entries);
+ vfree(newinfo->entries);
free_newinfo:
- if (newinfo)
- vfree(newinfo);
+ vfree(newinfo);
return ret;
}
@@ -1212,8 +1206,7 @@
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 vfree(table->private->chainstack[i]);
[-- Attachment #2: Type: text/plain, Size: 167 bytes --]
_______________________________________________
Kernel-janitors mailing list
Kernel-janitors@lists.osdl.org
http://lists.osdl.org/mailman/listinfo/kernel-janitors
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2005-01-04 21:57 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-01-04 21:57 [KJ] [PATCH] [14/29] ebtables.c - vfree() checking cleanups jlamanna
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.