net: dst: fix missing initialization of rt_uncached
[platform/kernel/linux-rpi.git] / net / ipv4 / xfrm4_policy.c
index 47861c8..9403bba 100644 (file)
@@ -91,7 +91,6 @@ static int xfrm4_fill_dst(struct xfrm_dst *xdst, struct net_device *dev,
                xdst->u.rt.rt_gw6 = rt->rt_gw6;
        xdst->u.rt.rt_pmtu = rt->rt_pmtu;
        xdst->u.rt.rt_mtu_locked = rt->rt_mtu_locked;
-       INIT_LIST_HEAD(&xdst->u.rt.dst.rt_uncached);
        rt_add_uncached_list(&xdst->u.rt);
 
        return 0;
@@ -121,8 +120,7 @@ static void xfrm4_dst_destroy(struct dst_entry *dst)
        struct xfrm_dst *xdst = (struct xfrm_dst *)dst;
 
        dst_destroy_metrics_generic(dst);
-       if (xdst->u.rt.dst.rt_uncached_list)
-               rt_del_uncached_list(&xdst->u.rt);
+       rt_del_uncached_list(&xdst->u.rt);
        xfrm_dst_destroy(xdst);
 }