IPSEC: Fix potential dst leak in xfrm_lookup
authorHerbert Xu <herbert@gondor.apana.org.au>
Thu, 20 Dec 2007 00:35:54 +0000 (16:35 -0800)
committerGreg Kroah-Hartman <gregkh@suse.de>
Fri, 8 Feb 2008 20:01:14 +0000 (12:01 -0800)
commit1c8db29a2f48adf8c015e0bca16ff34f2b53a34b
tree93c9d851cd74b147118d6a4b1a534d9fda1a6796
parent9f479dcdc1a6391f5bbe14a288031a5fd745a7f3
IPSEC: Fix potential dst leak in xfrm_lookup

[IPSEC]: Fix potential dst leak in xfrm_lookup

[ Upstream commit: 75b8c133267053c9986a7c8db5131f0e7349e806 ]

If we get an error during the actual policy lookup we don't free the
original dst while the caller expects us to always free the original
dst in case of error.

This patch fixes that.

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
net/xfrm/xfrm_policy.c