[NETFILTER]: nf_nat: fix memset error
authorLi Zefan <lizf@cn.fujitsu.com>
Tue, 13 Nov 2007 10:57:16 +0000 (02:57 -0800)
committerDavid S. Miller <davem@davemloft.net>
Tue, 13 Nov 2007 10:57:16 +0000 (02:57 -0800)
The size passing to memset is the size of a pointer.

Signed-off-by: Li Zefan <lizf@cn.fujitsu.com>
Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/ipv4/netfilter/nf_nat_core.c

index 56e93f692e82b363c010de0eeef16428a8ce4ba5..70e7997ea2844aead26de3776008cbbdd73358c9 100644 (file)
@@ -681,7 +681,7 @@ static int clean_nat(struct nf_conn *i, void *data)
 
        if (!nat)
                return 0;
-       memset(nat, 0, sizeof(nat));
+       memset(nat, 0, sizeof(*nat));
        i->status &= ~(IPS_NAT_MASK | IPS_NAT_DONE_MASK | IPS_SEQ_ADJUST);
        return 0;
 }