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:
@ -1349,6 +1349,7 @@ static inline struct xfrm_dst *xfrm_alloc_dst(struct net *net, int family)
|
||||
BUG();
|
||||
}
|
||||
xdst = dst_alloc(dst_ops, NULL, 0, 0, 0);
|
||||
memset(&xdst->u.rt6.rt6i_table, 0, sizeof(*xdst) - sizeof(struct dst_entry));
|
||||
xfrm_policy_put_afinfo(afinfo);
|
||||
|
||||
if (likely(xdst))
|
||||
|
Reference in New Issue
Block a user