On Thu, Jul 30, 2015 at 12:20:40PM -0400, Nicholas Krause wrote:
>
> diff --git a/net/ipv6/xfrm6_policy.c b/net/ipv6/xfrm6_policy.c
> index ed0583c..f60c670 100644
> --- a/net/ipv6/xfrm6_policy.c
> +++ b/net/ipv6/xfrm6_policy.c
> @@ -61,7 +61,9 @@ static int xfrm6_get_saddr(struct net *net,
>               return -EHOSTUNREACH;
>  
>       dev = ip6_dst_idev(dst)->dev;
> -     ipv6_dev_get_saddr(dev_net(dev), dev, &daddr->in6, 0, &saddr->in6);
> +     if (ipv6_dev_get_saddr(dev_net(dev), dev, &daddr->in6, 0, &saddr->in6))
> +             return -EADDRNOTAVAIL;
> +
>       dst_release(dst);

You're leaking dst.

Cheers,
-- 
Email: Herbert Xu <herb...@gondor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to