svn commit: r256894 - user/ed/newcons/sys/dev/vt
Aleksandr Rybalko
ray at FreeBSD.org
Tue Oct 22 13:53:58 UTC 2013
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);
More information about the svn-src-user
mailing list