Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 30 Dec 2001 05:59:50 -0800 (PST)
From:      David Xu <davidx@viasoft.com.cn>
To:        freebsd-gnats-submit@FreeBSD.org
Subject:   kern/33344: memory leak in device resource config load
Message-ID:  <200112301359.fBUDxoI89069@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         33344
>Category:       kern
>Synopsis:       memory leak in device resource config load
>Confidential:   no
>Severity:       serious
>Priority:       high
>Responsible:    freebsd-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Sun Dec 30 06:00:01 PST 2001
>Closed-Date:
>Last-Modified:
>Originator:     David Xu
>Release:        FreeBSD 4.5 prerelease
>Organization:
viasoft.com.cn
>Environment:
FreeBSD slim.viasoft.com.cn 4.5-PRERELEASE FreeBSD 4.5-PRERELEASE #2: 
Sun Dec 30 21:00:32 CST 2001 root@slim.viasoft.com.cn:/p3/src/sys/compile/xu  i386
>Description:
in file /sys/kern/subr_bus.c, there are memory leak when kernel initializes config_devtab resources. the bug is in resource_new_name().



>How-To-Repeat:
      
>Fix:
--- subr_bus.c.orig	Sun Dec 30 20:49:12 2001
+++ subr_bus.c	Sun Dec 30 20:59:43 2001
@@ -1381,6 +1381,8 @@
 	new[devtab_count].unit = unit;
 	new[devtab_count].resource_count = 0;
 	new[devtab_count].resources = NULL;
+	if (devtab && devtab != config_devtab)
+	    free(devtab, M_TEMP); 
 	devtab = new;
 	return devtab_count++;
 }

>Release-Note:
>Audit-Trail:
>Unformatted:

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-bugs" in the body of the message




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