aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv6/netfilter/nf_conntrack_reasm.c
diff options
context:
space:
mode:
authorDenis V. Lunev <den@openvz.org>2007-10-15 12:53:13 -0700
committerDavid S. Miller <davem@davemloft.net>2007-10-15 12:53:13 -0700
commitf1673ca52c04f1b311abe03fd67cd4d650d19435 (patch)
tree1e84a0c5021dfb300ee667a123c229bcb2bcaab3 /net/ipv6/netfilter/nf_conntrack_reasm.c
parent[ISDN]: Fix compile with CONFIG_ISDN_X25 disabled. (diff)
downloadlinux-dev-f1673ca52c04f1b311abe03fd67cd4d650d19435.tar.xz
linux-dev-f1673ca52c04f1b311abe03fd67cd4d650d19435.zip
[INET]: kmalloc+memset -> kzalloc in frag_alloc_queue
kmalloc + memset -> kzalloc in frag_alloc_queue Signed-off-by: Denis V. Lunev <den@openvz.org> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to '')
-rw-r--r--net/ipv6/netfilter/nf_conntrack_reasm.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/net/ipv6/netfilter/nf_conntrack_reasm.c b/net/ipv6/netfilter/nf_conntrack_reasm.c
index bf6f2f09eae3..726fafd41961 100644
--- a/net/ipv6/netfilter/nf_conntrack_reasm.c
+++ b/net/ipv6/netfilter/nf_conntrack_reasm.c
@@ -137,9 +137,10 @@ static void nf_frag_free(struct inet_frag_queue *q)
static inline struct nf_ct_frag6_queue *frag_alloc_queue(void)
{
- struct nf_ct_frag6_queue *fq = kmalloc(sizeof(struct nf_ct_frag6_queue), GFP_ATOMIC);
+ struct nf_ct_frag6_queue *fq;
- if (!fq)
+ fq = kzalloc(sizeof(struct nf_ct_frag6_queue), GFP_ATOMIC);
+ if (fq == NULL)
return NULL;
atomic_add(sizeof(struct nf_ct_frag6_queue), &nf_frags.mem);
return fq;
@@ -230,8 +231,6 @@ nf_ct_frag6_create(unsigned int hash, __be32 id, struct in6_addr *src, str
goto oom;
}
- memset(fq, 0, sizeof(struct nf_ct_frag6_queue));
-
fq->id = id;
ipv6_addr_copy(&fq->saddr, src);
ipv6_addr_copy(&fq->daddr, dst);