Skip to content

Commit e0bf9cf

Browse files
Li Zefandavem330
authored andcommitted
[NETFILTER]: nf_nat: fix memset error
The size passing to memset is the size of a pointer. Signed-off-by: Li Zefan <[email protected]> Signed-off-by: Patrick McHardy <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent d71209d commit e0bf9cf

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

net/ipv4/netfilter/nf_nat_core.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -681,7 +681,7 @@ static int clean_nat(struct nf_conn *i, void *data)
681681

682682
if (!nat)
683683
return 0;
684-
memset(nat, 0, sizeof(nat));
684+
memset(nat, 0, sizeof(*nat));
685685
i->status &= ~(IPS_NAT_MASK | IPS_NAT_DONE_MASK | IPS_SEQ_ADJUST);
686686
return 0;
687687
}

0 commit comments

Comments
 (0)