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>
This commit is contained in:
@@ -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;
|
||||
|
Reference in New Issue
Block a user