X-Git-Url: http://pilppa.org/gitweb/gitweb.cgi?a=blobdiff_plain;f=ipc%2Fsem.c;h=9964b2224c707d48c6aec6ef658bd3506e12467a;hb=486cab2ba25b469f7a8822e84fd43960a472e3d9;hp=21b3289d640c1eb0989457f42f1eb4b62b675aff;hpb=3d4248885b9fca818e7fe6b66328e714876d36ad;p=linux-2.6-omap-h63xx.git diff --git a/ipc/sem.c b/ipc/sem.c index 21b3289d640..9964b2224c7 100644 --- a/ipc/sem.c +++ b/ipc/sem.c @@ -75,7 +75,6 @@ #include #include #include -#include #include #include #include @@ -1070,14 +1069,13 @@ static struct sem_undo *find_undo(struct ipc_namespace *ns, int semid) ipc_rcu_getref(sma); sem_unlock(sma); - new = (struct sem_undo *) kmalloc(sizeof(struct sem_undo) + sizeof(short)*nsems, GFP_KERNEL); + new = kzalloc(sizeof(struct sem_undo) + sizeof(short)*nsems, GFP_KERNEL); if (!new) { ipc_lock_by_ptr(&sma->sem_perm); ipc_rcu_putref(sma); sem_unlock(sma); return ERR_PTR(-ENOMEM); } - memset(new, 0, sizeof(struct sem_undo) + sizeof(short)*nsems); new->semadj = (short *) &new[1]; new->semid = semid;