linux 2.6.16.38 w/ vs2.0.3-rc1
[linux-2.6.git] / net / core / gen_estimator.c
index 3cad026..b07c029 100644 (file)
@@ -159,10 +159,11 @@ int gen_new_estimator(struct gnet_stats_basic *bstats,
        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->bstats = bstats;
        est->rate_est = rate_est;