X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=net%2Fsched%2Fact_police.c;fp=net%2Fsched%2Fact_police.c;h=da905d7b4b40fd02fb9878a32ceae31941236094;hb=16c70f8c1b54b61c3b951b6fb220df250fe09b32;hp=24c348fa89222b3c8d11d5b4db2938d82f3d7ad6;hpb=4e76c8a9fa413ccc09d3f7f664183dcce3555d57;p=linux-2.6.git diff --git a/net/sched/act_police.c b/net/sched/act_police.c index 24c348fa8..da905d7b4 100644 --- a/net/sched/act_police.c +++ b/net/sched/act_police.c @@ -13,7 +13,6 @@ #include #include #include -#include #include #include #include @@ -197,10 +196,9 @@ static int tcf_act_police_locate(struct rtattr *rta, struct rtattr *est, return ret; } - p = kmalloc(sizeof(*p), GFP_KERNEL); + p = kzalloc(sizeof(*p), GFP_KERNEL); if (p == NULL) return -ENOMEM; - memset(p, 0, sizeof(*p)); ret = ACT_P_CREATED; p->refcnt = 1; @@ -430,11 +428,10 @@ struct tcf_police * tcf_police_locate(struct rtattr *rta, struct rtattr *est) return p; } - p = kmalloc(sizeof(*p), GFP_KERNEL); + p = kzalloc(sizeof(*p), GFP_KERNEL); if (p == NULL) return NULL; - memset(p, 0, sizeof(*p)); p->refcnt = 1; spin_lock_init(&p->lock); p->stats_lock = &p->lock;