summaryrefslogtreecommitdiffstats
path: root/net/decnet
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2011-04-28 23:31:47 +0200
committerDavid S. Miller <davem@davemloft.net>2011-04-29 07:26:00 +0200
commitcf91166223772ef4a2ed98b9874958bf6a2470df (patch)
treef8c86cc60798db9e4469031a8dceb5fcb512fb81 /net/decnet
parentnet: Make dst_alloc() take more explicit initializations. (diff)
downloadlinux-cf91166223772ef4a2ed98b9874958bf6a2470df.tar.xz
linux-cf91166223772ef4a2ed98b9874958bf6a2470df.zip
net: Use non-zero allocations in dst_alloc().
Make dst_alloc() and it's users explicitly initialize the entire entry. The zero'ing done by kmem_cache_zalloc() was almost entirely redundant. Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/decnet')
-rw-r--r--net/decnet/dn_route.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/net/decnet/dn_route.c b/net/decnet/dn_route.c
index f489b081c25d..74544bc6fdec 100644
--- a/net/decnet/dn_route.c
+++ b/net/decnet/dn_route.c
@@ -1129,6 +1129,7 @@ make_route:
if (rt == NULL)
goto e_nobufs;
+ memset(&rt->fld, 0, sizeof(rt->fld));
rt->fld.saddr = oldflp->saddr;
rt->fld.daddr = oldflp->daddr;
rt->fld.flowidn_oif = oldflp->flowidn_oif;
@@ -1398,6 +1399,7 @@ make_route:
if (rt == NULL)
goto e_nobufs;
+ memset(&rt->fld, 0, sizeof(rt->fld));
rt->rt_saddr = fld.saddr;
rt->rt_daddr = fld.daddr;
rt->rt_gateway = fld.daddr;