]> err.no Git - linux-2.6/blobdiff - net/sched/cls_api.c
Merge branch 'linux-2.6' into for-linus
[linux-2.6] / net / sched / cls_api.c
index 37a1840216474d77c2ad534903059bbeb1a840ea..edb8fc97ae11a183734f700aa06bbf84d758f78e 100644 (file)
@@ -217,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]);
@@ -247,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);