Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 22 Oct 2013 13:53:58 +0000 (UTC)
From:      Aleksandr Rybalko <ray@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-user@freebsd.org
Subject:   svn commit: r256894 - user/ed/newcons/sys/dev/vt
Message-ID:  <201310221353.r9MDrwlA015127@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: ray
Date: Tue Oct 22 13:53:58 2013
New Revision: 256894
URL: http://svnweb.freebsd.org/changeset/base/256894

Log:
  Don't forget to clean terminal window memory. But colors makes more smiles.
  
  Sponsored by:	The FreeBSD Foundation

Modified:
  user/ed/newcons/sys/dev/vt/vt_buf.c

Modified: user/ed/newcons/sys/dev/vt/vt_buf.c
==============================================================================
--- user/ed/newcons/sys/dev/vt/vt_buf.c	Tue Oct 22 13:52:20 2013	(r256893)
+++ user/ed/newcons/sys/dev/vt/vt_buf.c	Tue Oct 22 13:53:58 2013	(r256894)
@@ -336,10 +336,10 @@ vtbuf_init(struct vt_buf *vb, const term
 
 	if ((vb->vb_flags & VBF_STATIC) == 0) {
 		sz = vb->vb_history_size * p->tp_col * sizeof(term_char_t);
-		vb->vb_buffer = malloc(sz, M_VTBUF, M_WAITOK);
+		vb->vb_buffer = malloc(sz, M_VTBUF, M_WAITOK | M_ZERO);
 
 		sz = vb->vb_history_size * sizeof(term_char_t *);
-		vb->vb_rows = malloc(sz, M_VTBUF, M_WAITOK);
+		vb->vb_rows = malloc(sz, M_VTBUF, M_WAITOK | M_ZERO);
 	}
 
 	vtbuf_init_early(vb);
@@ -369,9 +369,9 @@ vtbuf_grow(struct vt_buf *vb, const term
 	    vb->vb_scr_size.tp_col) {
 		/* Allocate new buffer. */
 		bufsize = history_size * p->tp_col * sizeof(term_char_t);
-		new = malloc(bufsize, M_VTBUF, M_WAITOK|M_ZERO);
+		new = malloc(bufsize, M_VTBUF, M_WAITOK | M_ZERO);
 		rowssize = history_size * sizeof(term_pos_t *);
-		rows = malloc(rowssize, M_VTBUF, M_WAITOK|M_ZERO);
+		rows = malloc(rowssize, M_VTBUF, M_WAITOK | M_ZERO);
 
 		/* Toggle it. */
 		VTBUF_LOCK(vb);



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201310221353.r9MDrwlA015127>