diff options
author | Rusty Russell <rusty@rustcorp.com.au> | 2005-01-01 18:47:03 -0800 |
---|---|---|
committer | Linus Torvalds <torvalds@evo.osdl.org> | 2005-01-01 18:47:03 -0800 |
commit | 8f559333ede9230de600f4293a2c180cfa7ceb0e (patch) | |
tree | c43dca22b22820b1705cb2a27a42b035ffa3230d /net | |
parent | 7e00d78dccb4f8fab0ec39060655a4904c0ce0a3 (diff) | |
download | history-8f559333ede9230de600f4293a2c180cfa7ceb0e.tar.gz |
[PATCH] Fix cleanup path when sysctl registration fails
nfsim gains sysctl support, and sure enough, --failtest uncovered an
unregister when the registration had failed.
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'net')
-rw-r--r-- | net/ipv4/netfilter/ip_conntrack_standalone.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/net/ipv4/netfilter/ip_conntrack_standalone.c b/net/ipv4/netfilter/ip_conntrack_standalone.c index 9c01c09721b390..5040ba5096e64a 100644 --- a/net/ipv4/netfilter/ip_conntrack_standalone.c +++ b/net/ipv4/netfilter/ip_conntrack_standalone.c @@ -791,7 +791,8 @@ static int init_or_cleanup(int init) ip_ct_sysctl_header = register_sysctl_table(ip_ct_net_table, 0); if (ip_ct_sysctl_header == NULL) { printk("ip_conntrack: can't register to sysctl.\n"); - goto cleanup; + ret = -ENOMEM; + goto cleanup_localinops; } #endif @@ -800,6 +801,7 @@ static int init_or_cleanup(int init) cleanup: #ifdef CONFIG_SYSCTL unregister_sysctl_table(ip_ct_sysctl_header); + cleanup_localinops: #endif nf_unregister_hook(&ip_conntrack_local_in_ops); cleanup_inoutandlocalops: |