X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=net%2Fsched%2Festimator.c;h=5d3ae03e22a70fdf49350f833a282c0a3e12624a;hb=9464c7cf61b9433057924c36e6e02f303a00e768;hp=0ebc98e9be2d81d5904a71da0cf2a24c01bf2615;hpb=41689045f6a3cbe0550e1d34e9cc20d2e8c432ba;p=linux-2.6.git diff --git a/net/sched/estimator.c b/net/sched/estimator.c index 0ebc98e9b..5d3ae03e2 100644 --- a/net/sched/estimator.c +++ b/net/sched/estimator.c @@ -139,10 +139,11 @@ int qdisc_new_estimator(struct tc_stats *stats, spinlock_t *stats_lock, struct r if (parm->interval < -2 || parm->interval > 3) return -EINVAL; - est = kzalloc(sizeof(*est), GFP_KERNEL); + est = kmalloc(sizeof(*est), GFP_KERNEL); if (est == NULL) return -ENOBUFS; + memset(est, 0, sizeof(*est)); est->interval = parm->interval + 2; est->stats = stats; est->stats_lock = stats_lock;