diff options
author | David S. Miller <davem@davemloft.net> | 2011-04-28 14:31:47 -0700 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2011-04-28 22:26:00 -0700 |
commit | cf91166223772ef4a2ed98b9874958bf6a2470df (patch) | |
tree | f8c86cc60798db9e4469031a8dceb5fcb512fb81 /net/decnet | |
parent | 5c1e6aa300a7a669dc469d2dcb20172c6bd8fed9 (diff) | |
download | kernel_goldelico_gta04-cf91166223772ef4a2ed98b9874958bf6a2470df.zip kernel_goldelico_gta04-cf91166223772ef4a2ed98b9874958bf6a2470df.tar.gz kernel_goldelico_gta04-cf91166223772ef4a2ed98b9874958bf6a2470df.tar.bz2 |
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.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/net/decnet/dn_route.c b/net/decnet/dn_route.c index f489b08..74544bc 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; |