summaryrefslogtreecommitdiffstats
path: root/sound/Kconfig
diff options
context:
space:
mode:
authorPatrick McHardy <kaber@trash.net>2005-06-19 07:45:31 +0200
committerDavid S. Miller <davem@davemloft.net>2005-06-19 07:45:31 +0200
commit7d6dfe1f5bc4c56e0c31173014a099ec3fa35907 (patch)
treea6b04337c4f6d1ff7b050082dc7e69dc5617d3d0 /sound/Kconfig
parent[IPSEC] Use XFRM_MSG_* instead of XFRM_SAP_* (diff)
downloadlinux-7d6dfe1f5bc4c56e0c31173014a099ec3fa35907.tar.xz
linux-7d6dfe1f5bc4c56e0c31173014a099ec3fa35907.zip
[IPSEC] Fix xfrm_state leaks in error path
Herbert Xu wrote: > @@ -1254,6 +1326,7 @@ static int pfkey_add(struct sock *sk, st > if (IS_ERR(x)) > return PTR_ERR(x); > > + xfrm_state_hold(x); This introduces a leak when xfrm_state_add()/xfrm_state_update() fail. We hold two references (one from xfrm_state_alloc(), one from xfrm_state_hold()), but only drop one. We need to take the reference because the reference from xfrm_state_alloc() can be dropped by __xfrm_state_delete(), so the fix is to drop both references on error. Same problem in xfrm_user.c. Signed-off-by: Patrick McHardy <kaber@trash.net> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'sound/Kconfig')
0 files changed, 0 insertions, 0 deletions