Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev/wscons allocate char and attr buffers with M_ZERO
details: https://anonhg.NetBSD.org/src/rev/24bfa32d3c97
branches: trunk
changeset: 333606:24bfa32d3c97
user: jmcneill <jmcneill%NetBSD.org@localhost>
date: Mon Nov 10 20:52:47 2014 +0000
description:
allocate char and attr buffers with M_ZERO
diffstat:
sys/dev/wscons/wsdisplay_vcons.c | 10 ++++++----
1 files changed, 6 insertions(+), 4 deletions(-)
diffs (31 lines):
diff -r 659f5c5f3a7d -r 24bfa32d3c97 sys/dev/wscons/wsdisplay_vcons.c
--- a/sys/dev/wscons/wsdisplay_vcons.c Mon Nov 10 20:36:12 2014 +0000
+++ b/sys/dev/wscons/wsdisplay_vcons.c Mon Nov 10 20:52:47 2014 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: wsdisplay_vcons.c,v 1.32 2014/03/18 18:20:42 riastradh Exp $ */
+/* $NetBSD: wsdisplay_vcons.c,v 1.33 2014/11/10 20:52:47 jmcneill Exp $ */
/*-
* Copyright (c) 2005, 2006 Michael Lorenz
@@ -27,7 +27,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: wsdisplay_vcons.c,v 1.32 2014/03/18 18:20:42 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: wsdisplay_vcons.c,v 1.33 2014/11/10 20:52:47 jmcneill Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -314,8 +314,10 @@
if (vd->chars != NULL) free(vd->chars, M_DEVBUF);
if (vd->attrs != NULL) free(vd->attrs, M_DEVBUF);
vd->cells = size;
- vd->chars = malloc(size * sizeof(uint32_t), M_DEVBUF, M_WAITOK);
- vd->attrs = malloc(size * sizeof(long), M_DEVBUF, M_WAITOK);
+ vd->chars = malloc(size * sizeof(uint32_t), M_DEVBUF,
+ M_WAITOK|M_ZERO);
+ vd->attrs = malloc(size * sizeof(long), M_DEVBUF,
+ M_WAITOK|M_ZERO);
vcons_invalidate_cache(vd);
}
#endif
Home |
Main Index |
Thread Index |
Old Index