diff options
author | Thomas Egerer <thomas.egerer@secunet.com> | 2010-12-06 23:28:56 +0000 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2010-12-09 20:35:27 -0800 |
commit | 78347c8c6b2ddf20535bc1b18d749a3bbdea2a60 (patch) | |
tree | 2aa2048f11a93c4319b023e938eee387d19c96f4 /net | |
parent | fb4fa76a1fa59340154c42d998d700e1f8bf21e0 (diff) | |
download | linux-3.10-78347c8c6b2ddf20535bc1b18d749a3bbdea2a60.tar.gz linux-3.10-78347c8c6b2ddf20535bc1b18d749a3bbdea2a60.tar.bz2 linux-3.10-78347c8c6b2ddf20535bc1b18d749a3bbdea2a60.zip |
xfrm: Fix xfrm_state_migrate leak
xfrm_state_migrate calls kfree instead of xfrm_state_put to free
a failed state. According to git commit 553f9118 this can cause
memory leaks.
Signed-off-by: Thomas Egerer <thomas.egerer@secunet.com>
Signed-off-by: Steffen Klassert <steffen.klassert@secunet.com>
Acked-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net')
-rw-r--r-- | net/xfrm/xfrm_state.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/net/xfrm/xfrm_state.c b/net/xfrm/xfrm_state.c index eb96ce52f17..220ebc05c7a 100644 --- a/net/xfrm/xfrm_state.c +++ b/net/xfrm/xfrm_state.c @@ -1268,7 +1268,7 @@ struct xfrm_state * xfrm_state_migrate(struct xfrm_state *x, return xc; error: - kfree(xc); + xfrm_state_put(xc); return NULL; } EXPORT_SYMBOL(xfrm_state_migrate); |