aboutsummaryrefslogtreecommitdiffstats
path: root/net/sched/cls_tcindex.c
diff options
context:
space:
mode:
authorJesper Juhl <jesper.juhl@gmail.com>2005-11-08 12:41:34 -0500
committerDavid S. Miller <davem@davemloft.net>2005-11-08 12:41:34 -0500
commita51482bde22f99c63fbbb57d5d46cc666384e379 (patch)
tree5482ed1c0803edb2ffbd51035de921fb0f72d82b /net/sched/cls_tcindex.c
parentac7c98eca88a854755475fcfe1b2bf5f97f90d99 (diff)
[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>
Diffstat (limited to 'net/sched/cls_tcindex.c')
-rw-r--r--net/sched/cls_tcindex.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/net/sched/cls_tcindex.c b/net/sched/cls_tcindex.c
index 404d9d83a7fa..9f921174c8ab 100644
--- a/net/sched/cls_tcindex.c
+++ b/net/sched/cls_tcindex.c
@@ -194,8 +194,7 @@ found:
194 } 194 }
195 tcf_unbind_filter(tp, &r->res); 195 tcf_unbind_filter(tp, &r->res);
196 tcf_exts_destroy(tp, &r->exts); 196 tcf_exts_destroy(tp, &r->exts);
197 if (f) 197 kfree(f);
198 kfree(f);
199 return 0; 198 return 0;
200} 199}
201 200
@@ -442,10 +441,8 @@ static void tcindex_destroy(struct tcf_proto *tp)
442 walker.skip = 0; 441 walker.skip = 0;
443 walker.fn = &tcindex_destroy_element; 442 walker.fn = &tcindex_destroy_element;
444 tcindex_walk(tp,&walker); 443 tcindex_walk(tp,&walker);
445 if (p->perfect) 444 kfree(p->perfect);
446 kfree(p->perfect); 445 kfree(p->h);
447 if (p->h)
448 kfree(p->h);
449 kfree(p); 446 kfree(p);
450 tp->root = NULL; 447 tp->root = NULL;
451} 448}