From 8ed87184f7290c89caab0a6844ce380563e0151f Mon Sep 17 00:00:00 2001 From: Keir Fraser Date: Mon, 23 Nov 2009 07:22:28 +0000 Subject: minios: Fix fb/kbd initialization When allocating kbdfront and fbfront structures, we should zero them since we do not initialize all fields. Signed-Off-By: Samuel Thibault --- extras/mini-os/fbfront.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'extras') diff --git a/extras/mini-os/fbfront.c b/extras/mini-os/fbfront.c index d06b5351ab..0d61ec3fe6 100644 --- a/extras/mini-os/fbfront.c +++ b/extras/mini-os/fbfront.c @@ -80,6 +80,7 @@ struct kbdfront_dev *init_kbdfront(char *_nodename, int abs_pointer) printk("******************* KBDFRONT for %s **********\n\n\n", nodename); dev = malloc(sizeof(*dev)); + memset(dev, 0, sizeof(*dev)); dev->nodename = strdup(nodename); #ifdef HAVE_LIBC dev->fd = -1; @@ -403,6 +404,7 @@ struct fbfront_dev *init_fbfront(char *_nodename, unsigned long *mfns, int width printk("******************* FBFRONT for %s **********\n\n\n", nodename); dev = malloc(sizeof(*dev)); + memset(dev, 0, sizeof(*dev)); dev->nodename = strdup(nodename); #ifdef HAVE_LIBC dev->fd = -1; -- cgit v1.2.3