netfilter: ct_extend: fix the wrong alloc_size
authorChangli Gao <xiaosuo@gmail.com>
Mon, 15 Nov 2010 10:47:52 +0000 (11:47 +0100)
committerPatrick McHardy <kaber@trash.net>
Mon, 15 Nov 2010 10:47:52 +0000 (11:47 +0100)
In function update_alloc_size(), sizeof(struct nf_ct_ext) is added twice
wrongly.

Signed-off-by: Changli Gao <xiaosuo@gmail.com>
Signed-off-by: Patrick McHardy <kaber@trash.net>
net/netfilter/nf_conntrack_extend.c

index bd82450c193f5dbb4895f4fc7565040686fa740d..920f9244388be0e6d9e17e33fac171b17aac0ef3 100644 (file)
@@ -144,9 +144,8 @@ static void update_alloc_size(struct nf_ct_ext_type *type)
                if (!t1)
                        continue;
 
-               t1->alloc_size = sizeof(struct nf_ct_ext)
-                                + ALIGN(sizeof(struct nf_ct_ext), t1->align)
-                                + t1->len;
+               t1->alloc_size = ALIGN(sizeof(struct nf_ct_ext), t1->align) +
+                                t1->len;
                for (j = 0; j < NF_CT_EXT_NUM; j++) {
                        t2 = nf_ct_ext_types[j];
                        if (t2 == NULL || t2 == t1 ||