ipcomp: Avoid duplicate calls to ipcomp_destroy
authorHerbert Xu <herbert@gondor.apana.org.au>
Mon, 15 Feb 2010 19:24:30 +0000 (19:24 +0000)
committerDavid S. Miller <davem@davemloft.net>
Tue, 16 Feb 2010 22:53:24 +0000 (14:53 -0800)
When ipcomp_tunnel_attach fails we will call ipcomp_destroy twice.
This may lead to double-frees on certain structures.

As there is no reason to explicitly call ipcomp_destroy, this patch
removes it from ipcomp*.c and lets the standard xfrm_state destruction
take place.

This is based on the discovery and patch by Alexey Dobriyan.

Tested-by: Alexey Dobriyan <adobriyan@gmail.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/ipv4/ipcomp.c
net/ipv6/ipcomp6.c

Simple merge
Simple merge