Skip to contentSkip to conversation

: nf_conntrack_expect: fix error path unwind in nf_conntrack_expect_init()

PATCH In review Patrick McHardy 2 participants 2 messages May 27, 2008 – May 29, 2008

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 : nf_conntrack_expect: fix error path unwind in nf_conntrack_expect_init()

Attached is a fix from Alexey for incorrect error handling in nf_conntrack_expect. I'll also queue it up for -stable.

commit 4a000134ae4d0092de7ef5d8536e3a21d18eb46c

Author: Alexey Dobriyan <[email protected]>
Date:   Tue May 27 06:18:46 2008 +0200

[NETFILTER]: nf_conntrack_expect: fix error path unwind in nf_conntrack_expect_init()

net/netfilter/nf_conntrack_expect.c +2 -2
index e31beeb..e8f0dea 100644
@@ -587,10 +587,10 @@ int __init nf_conntrack_expect_init(void)
 	return 0;
 
 err3:
+	kmem_cache_destroy(nf_ct_expect_cachep);
+err2:
 	nf_ct_free_hashtable(nf_ct_expect_hash, nf_ct_expect_vmalloc,
 			     nf_ct_expect_hsize);
-err2:
-	kmem_cache_destroy(nf_ct_expect_cachep);
 err1:
 	return err;
 }
maintainer
#1 lore raw

From: Patrick McHardy <[email protected]>
Date: Tue, 27 May 2008 07:00:22 +0200

Quoted 2 lines

Attached is a fix from Alexey for incorrect error handling in nf_conntrack_expect. I'll also queue it up for -stable.

Applied and pushed out to net-2.6, thanks Patrick.