Re: [3/4] [IPSEC] Add route element to xfrm_dst
From: Herbert Xu <herbert@gondor.apana.org.au>
Date: 2005-02-15 09:53:46
From: Herbert Xu <herbert@gondor.apana.org.au>
Date: 2005-02-15 09:53:46
On Tue, Feb 15, 2005 at 10:10:06AM +0200, Mika Penttil? wrote:
Shouldn't this pinning happen inside the loop for eaxh xdst, to be balanced with the dst_release(xdst->route) in xfrm_dst_destroy ?quoted
+ dst_hold(&rt->u.dst); for (i = 0; i < nx; i++) { struct dst_entry *dst1 = dst_alloc(&xfrm4_dst_ops); + struct xfrm_dst *xdst; if (unlikely(dst1 == NULL)) { err = -ENOBUFS;
There is a dst_release here. The reference is either released here if the allocation fails, or it is held by dst1 which is either returned or freed as part of the bundle. Cheers, -- Visit Openswan at http://www.openswan.org/ Email: Herbert Xu ~{PmV>HI~} [off-list ref] Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt