[parisc-linux-cvs] don't assume kmalloc() returns zeroed memory

Richard Hirst rhirst@linuxcare.com
Tue, 12 Jun 2001 08:20:06 +0100


Index: drivers/char/console.c
===================================================================
RCS file: /home/cvs/parisc/linux/drivers/char/console.c,v
retrieving revision 1.11
diff -u -r1.11 console.c
--- console.c	2001/01/25 00:00:39	1.11
+++ console.c	2001/06/12 13:16:24
@@ -652,6 +652,7 @@
 	    p = (long) kmalloc(structsize, GFP_KERNEL);
 	    if (!p)
 		return -ENOMEM;
+	    memset((void *)p, 0, structsize);
 	    vc_cons[currcons].d = (struct vc_data *)p;
 	    vt_cons[currcons] = (struct vt_struct *)(p+sizeof(struct vc_data));
 	    visual_init(currcons, 1);