netdev
[Top] [All Lists]

Re: [IPV6] Fix memory leaks in TCP error path

To: "David S. Miller" <davem@xxxxxxxxxxxxx>
Subject: Re: [IPV6] Fix memory leaks in TCP error path
From: Herbert Xu <herbert@xxxxxxxxxxxxxxxxxxx>
Date: Sat, 6 Nov 2004 11:31:07 +1100
Cc: yoshfuji@xxxxxxxxxxxxxx, netdev@xxxxxxxxxxx
In-reply-to: <20041105161820.5c9bd53b.davem@xxxxxxxxxxxxx>
References: <20041105084904.GA8253@xxxxxxxxxxxxxxxxxxx> <20041105161820.5c9bd53b.davem@xxxxxxxxxxxxx>
Sender: netdev-bounce@xxxxxxxxxxx
User-agent: Mutt/1.5.6+20040722i
On Fri, Nov 05, 2004 at 04:18:20PM -0800, David S. Miller wrote:
> 
> This patch actually adds a leak with the way xfrm_lookup() is currently
> coded.
>
> This means that to cover all cases you have to have the dst_release()
> there in that "if (xfrm_lookup()<0)" code path in order to handle
> case #2 above.

Not quite.  kfree_skb will release the dst for you.

Cheers,
-- 
Visit Openswan at http://www.openswan.org/
Email: Herbert Xu ~{PmV>HI~} <herbert@xxxxxxxxxxxxxxxxxxx>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt

<Prev in Thread] Current Thread [Next in Thread>