X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=net%2Fsched%2Fsch_gred.c;fp=net%2Fsched%2Fsch_gred.c;h=29a2dd9f30296f613123118976c963f557e899d6;hb=64ba3f394c830ec48a1c31b53dcae312c56f1604;hp=18e81a8ffb012e5aab0b7b6b9d9f1d3965f803d3;hpb=be1e6109ac94a859551f8e1774eb9a8469fe055c;p=linux-2.6.git diff --git a/net/sched/sch_gred.c b/net/sched/sch_gred.c index 18e81a8ff..29a2dd9f3 100644 --- a/net/sched/sch_gred.c +++ b/net/sched/sch_gred.c @@ -18,6 +18,7 @@ * For all the glorious comments look at include/net/red.h */ +#include #include #include #include @@ -406,9 +407,10 @@ static inline int gred_change_vq(struct Qdisc *sch, int dp, struct gred_sched_data *q; if (table->tab[dp] == NULL) { - table->tab[dp] = kzalloc(sizeof(*q), GFP_KERNEL); + table->tab[dp] = kmalloc(sizeof(*q), GFP_KERNEL); if (table->tab[dp] == NULL) return -ENOMEM; + memset(table->tab[dp], 0, sizeof(*q)); } q = table->tab[dp];