Tushar Gohad 8fcbc63701 XFRM: Fix memory leak in xfrm_state_update
Upon "ip xfrm state update ..", xfrm_add_sa() takes an extra reference on
the user-supplied SA and forgets to drop the reference when
xfrm_state_update() returns 0.  This leads to a memory leak as the
parameter SA is never freed.  This change attempts to fix the leak by
calling __xfrm_state_put() when xfrm_state_update() updates a valid SA
(err = 0).  The parameter SA is added to the gc list when the final
reference is dropped by xfrm_add_sa() upon completion.

Signed-off-by: Tushar Gohad <tgohad@mvista.com>
Acked-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
2011-07-08 08:58:42 -07:00
..
2011-05-23 16:29:24 -04:00
2011-04-17 00:48:31 -07:00
2011-03-14 17:02:42 -07:00
2011-03-17 11:59:32 +11:00
2011-01-12 19:00:40 -08:00
2011-03-21 18:16:39 -07:00
2011-05-24 01:13:12 -04:00
2011-05-24 01:13:12 -04:00
2011-05-24 01:13:12 -04:00
2011-05-24 01:13:12 -04:00
2011-03-31 11:26:23 -03:00
2011-03-31 11:26:23 -03:00
2011-05-05 11:10:14 -07:00
2011-04-29 10:20:53 -07:00
2010-10-15 15:53:27 +02:00