X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=net%2Fsched%2Fcls_api.c;h=edb8fc97ae11a183734f700aa06bbf84d758f78e;hb=2198dfa3c6db25b9ba5f67d3080869b8d37fb60e;hp=8c237c13bd8d44deb60df2992646d09d60aef430;hpb=987b0145d94eecf292d8b301228356f44611ab7c;p=linux-2.6.git diff --git a/net/sched/cls_api.c b/net/sched/cls_api.c index 8c237c13b..edb8fc97a 100644 --- a/net/sched/cls_api.c +++ b/net/sched/cls_api.c @@ -17,7 +17,6 @@ #include #include #include -#include #include #include #include @@ -218,7 +217,7 @@ replay: /* Create new proto tcf */ err = -ENOBUFS; - if ((tp = kmalloc(sizeof(*tp), GFP_KERNEL)) == NULL) + if ((tp = kzalloc(sizeof(*tp), GFP_KERNEL)) == NULL) goto errout; err = -EINVAL; tp_ops = tcf_proto_lookup_ops(tca[TCA_KIND-1]); @@ -248,7 +247,6 @@ replay: kfree(tp); goto errout; } - memset(tp, 0, sizeof(*tp)); tp->ops = tp_ops; tp->protocol = protocol; tp->prio = nprio ? : tcf_auto_prio(*back);