[NET]: kfree cleanup
From: Jesper Juhl <jesper.juhl@gmail.com> This is the net/ part of the big kfree cleanup patch. Remove pointless checks for NULL prior to calling kfree() in net/. Signed-off-by: Jesper Juhl <jesper.juhl@gmail.com> Cc: "David S. Miller" <davem@davemloft.net> Cc: Arnaldo Carvalho de Melo <acme@conectiva.com.br> Acked-by: Marcel Holtmann <marcel@holtmann.org> Acked-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org> Signed-off-by: Andrew Morton <akpm@osdl.org>
This commit is contained in:

committed by
David S. Miller

parent
ac7c98eca8
commit
a51482bde2
@@ -62,14 +62,10 @@ static void xfrm_state_gc_destroy(struct xfrm_state *x)
|
||||
{
|
||||
if (del_timer(&x->timer))
|
||||
BUG();
|
||||
if (x->aalg)
|
||||
kfree(x->aalg);
|
||||
if (x->ealg)
|
||||
kfree(x->ealg);
|
||||
if (x->calg)
|
||||
kfree(x->calg);
|
||||
if (x->encap)
|
||||
kfree(x->encap);
|
||||
kfree(x->aalg);
|
||||
kfree(x->ealg);
|
||||
kfree(x->calg);
|
||||
kfree(x->encap);
|
||||
if (x->type) {
|
||||
x->type->destructor(x);
|
||||
xfrm_put_type(x->type);
|
||||
|
Reference in New Issue
Block a user