From inof@baryt.rz.tu-clausthal.de  Wed Dec  8 14:06:31 1999
Return-Path: <inof@baryt.rz.tu-clausthal.de>
Received: from baryt.rz.tu-clausthal.de (baryt.rz.tu-clausthal.de [139.174.1.78])
	by hub.freebsd.org (Postfix) with ESMTP id 7AB4815116
	for <FreeBSD-gnats-submit@freebsd.org>; Wed,  8 Dec 1999 14:06:26 -0800 (PST)
	(envelope-from inof@baryt.rz.tu-clausthal.de)
Received: (from inof@localhost)
	by baryt.rz.tu-clausthal.de (8.9.3/8.9.3) id XAA00447;
	Wed, 8 Dec 1999 23:06:22 +0100 (CET)
	(envelope-from inof)
Message-Id: <199912082206.XAA00447@baryt.rz.tu-clausthal.de>
Date: Wed, 8 Dec 1999 23:06:22 +0100 (CET)
From: oliver.fromme@heim3.tu-clausthal.de
Sender: inof@baryt.rz.tu-clausthal.de
Reply-To: oliver.fromme@heim3.tu-clausthal.de
To: FreeBSD-gnats-submit@freebsd.org
Subject: Memory leak in syscons (fix included)
X-Send-Pr-Version: 3.2

>Number:         15363
>Category:       kern
>Synopsis:       Memory leak in syscons (fix included)
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    yokota
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Wed Dec  8 14:10:01 PST 1999
>Closed-Date:    Fri Dec 10 01:39:22 PST 1999
>Last-Modified:  Fri Dec 10 01:39:46 PST 1999
>Originator:     Oliver Fromme
>Release:        FreeBSD 4.0-19991204-CURRENT i386
>Organization:
Clausthal University of Technology
>Environment:

   4.0-current

>Description:

   There's a memory leak in the history buffer management of
   syscons (in 4.0-current).  For example, each time the screen
   mode of a virtual terminal is changed, the memory of its old
   history buffer stays around.

>How-To-Repeat:

>Fix:

   This patch is against this file:
   src/sys/dev/syscons/schistory.c,v 1.5 1999/09/19 08:58:53

--- src/sys/dev/syscons.orig/schistory.c	Sun Sep 19 10:58:53 1999
+++ src/sys/dev/syscons/schistory.c	Wed Dec  8 09:53:33 1999
@@ -135,6 +135,7 @@
 	if (prev_history != NULL) {
 		extra_history_size += delta;
 		sc_vtb_destroy(prev_history);
+		free(prev_history, M_DEVBUF);
 	}
 
 	scp->history = history;


>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-bugs->yokota  
Responsible-Changed-By: cpiazza 
Responsible-Changed-When: Wed Dec 8 15:47:22 PST 1999 
Responsible-Changed-Why:  
Over to maintainer 
State-Changed-From-To: open->closed 
State-Changed-By: yokota 
State-Changed-When: Fri Dec 10 01:39:22 PST 1999 
State-Changed-Why:  
Fix committed.  Thanks! 
>Unformatted:
