From root@p3.my.net  Sat Nov 24 20:33:46 2001
Return-Path: <root@p3.my.net>
Received: from p3.my.net (215ppp.telegraph.spb.ru [213.158.1.215])
	by hub.freebsd.org (Postfix) with ESMTP id 0D8F437B416
	for <FreeBSD-gnats-submit@freebsd.org>; Sat, 24 Nov 2001 20:33:44 -0800 (PST)
Received: (from root@localhost)
	by p3.my.net (8.11.6/8.11.3) id fANJ4bK01246;
	Fri, 23 Nov 2001 22:04:37 +0300 (MSK)
	(envelope-from root)
Message-Id: <200111231904.fANJ4bK01246@p3.my.net>
Date: Fri, 23 Nov 2001 22:04:37 +0300 (MSK)
From: Igor Pokrovsky <tiamat@telegraph.spb.ru>
Reply-To: Igor Pokrovsky <tiamat@telegraph.spb.ru>
To: FreeBSD-gnats-submit@freebsd.org
Cc:
Subject: Memory deallocation bug in libdialog
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         32260
>Category:       gnu
>Synopsis:       Memory deallocation bug in libdialog
>Confidential:   no
>Severity:       non-critical
>Priority:       high
>Responsible:    ru
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Sat Nov 24 20:40:00 PST 2001
>Closed-Date:    Sat Dec 1 08:08:33 PST 2001
>Last-Modified:  Sat Dec 01 08:09:26 PST 2001
>Originator:     Igor Pokrovsky
>Release:        FreeBSD 4.4-STABLE i386
>Organization:
>Environment:
System: FreeBSD p3.my.net 4.4-STABLE FreeBSD 4.4-STABLE #0: Wed Nov 21 20:26:00 MSK 2001 root@p3.my.net:/usr/src/sys/compile/KERNEL i386


	
>Description:
	I have got "out of swap space" errors, when using function 'dialog_gauge'
	from libdialog.
	
>How-To-Repeat:
	Try to call function 'dialog_gauge' about 100000 times, and you'll
	see how your swap size is growing. I'm using libdialog from
	4.4 STABLE (got from CVS).
	
>Fix:
	The only change required is to insert releasing window memory function
	(delwin(gw)) just before last line, containing 'return', of function
	'dialog_gauge'.
	Here is also the patch
*** gauge.old	Fri Nov 23 21:04:54 2001
--- gauge.c	Fri Nov 23 21:04:30 2001
***************
*** 67,72 ****
--- 67,74 ----
  
      wrefresh(gw);
  
+     delwin(gw);
+ 
      return;
  } /* dialog_gauge() */
	
>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->feedback 
State-Changed-By: ru 
State-Changed-When: Wed Nov 28 23:41:44 PST 2001 
State-Changed-Why:  
Committed to 5.0-CURRENT as src/gnu/lib/libdialog/gauge.c,v 1.3. 
Thanks! 


Responsible-Changed-From-To: freebsd-bugs->ru 
Responsible-Changed-By: ru 
Responsible-Changed-When: Wed Nov 28 23:41:44 PST 2001 
Responsible-Changed-Why:  
MFC glue. 

http://www.FreeBSD.org/cgi/query-pr.cgi?pr=32260 
State-Changed-From-To: feedback->closed 
State-Changed-By: ru 
State-Changed-When: Sat Dec 1 08:08:33 PST 2001 
State-Changed-Why:  
Merged to 4.4-STABLE. 

http://www.FreeBSD.org/cgi/query-pr.cgi?pr=32260 
>Unformatted:
