X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=arch%2Farm%2Fkernel%2Fapm.c;h=766b6c05c6db6a2cf9d97e4a0f8d4a84f475f63b;hb=987b0145d94eecf292d8b301228356f44611ab7c;hp=2bed290fec76b4522bee0befb6812f141f82aaab;hpb=f7ed79d23a47594e7834d66a8f14449796d4f3e6;p=linux-2.6.git diff --git a/arch/arm/kernel/apm.c b/arch/arm/kernel/apm.c index 2bed290fe..766b6c05c 100644 --- a/arch/arm/kernel/apm.c +++ b/arch/arm/kernel/apm.c @@ -357,8 +357,10 @@ static int apm_open(struct inode * inode, struct file * filp) { struct apm_user *as; - as = (struct apm_user *)kzalloc(sizeof(*as), GFP_KERNEL); + as = (struct apm_user *)kmalloc(sizeof(*as), GFP_KERNEL); if (as) { + memset(as, 0, sizeof(*as)); + /* * XXX - this is a tiny bit broken, when we consider BSD * process accounting. If the device is opened by root, we