From owner-svn-src-user@FreeBSD.ORG Tue Oct 22 13:53:58 2013 Return-Path: Delivered-To: svn-src-user@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 913BADD2; Tue, 22 Oct 2013 13:53:58 +0000 (UTC) (envelope-from ray@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 7F2482CF1; Tue, 22 Oct 2013 13:53:58 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r9MDrwBL015128; Tue, 22 Oct 2013 13:53:58 GMT (envelope-from ray@svn.freebsd.org) Received: (from ray@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r9MDrwlA015127; Tue, 22 Oct 2013 13:53:58 GMT (envelope-from ray@svn.freebsd.org) Message-Id: <201310221353.r9MDrwlA015127@svn.freebsd.org> From: Aleksandr Rybalko Date: Tue, 22 Oct 2013 13:53:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org Subject: svn commit: r256894 - user/ed/newcons/sys/dev/vt X-SVN-Group: user MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the experimental " user" src tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 22 Oct 2013 13:53:58 -0000 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);