Commit 287b7862 authored by Rusty Russell's avatar Rusty Russell Committed by Linus Torvalds

[PATCH] netfilter: Fix cleanup in ipt_recent should ipt_registrater_match error

When ipt_registrater_match() fails, ipt_recent doesn't remove its proc
entry.  Found by nfsim.
Signed-off-by: default avatarRusty Russell <rusty@rustcorp.com.au>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent be4bae19
...@@ -959,7 +959,7 @@ static struct ipt_match recent_match = { ...@@ -959,7 +959,7 @@ static struct ipt_match recent_match = {
/* Kernel module initialization. */ /* Kernel module initialization. */
static int __init init(void) static int __init init(void)
{ {
int count; int err, count;
printk(version); printk(version);
#ifdef CONFIG_PROC_FS #ifdef CONFIG_PROC_FS
...@@ -983,7 +983,10 @@ static int __init init(void) ...@@ -983,7 +983,10 @@ static int __init init(void)
if(debug) printk(KERN_INFO RECENT_NAME ": ip_list_hash_size: %d\n",ip_list_hash_size); if(debug) printk(KERN_INFO RECENT_NAME ": ip_list_hash_size: %d\n",ip_list_hash_size);
#endif #endif
return ipt_register_match(&recent_match); err = ipt_register_match(&recent_match);
if (err)
remove_proc_entry("ipt_recent", proc_net);
return err;
} }
/* Kernel module destruction. */ /* Kernel module destruction. */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment