>Number: 138374
>Category: kern
>Synopsis: Resource leak in command_help() in file sys/boot/common/commands.c
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: freebsd-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: sw-bug
>Submitter-Id: current-users
>Arrival-Date: Mon Aug 31 09:20:03 UTC 2009
>Closed-Date:
>Last-Modified:
>Originator: Patroklos Argyroudis
>Release: 8.0-CURRENT
>Organization:
census, inc
>Environment:
N/A
>Description:
In function command_help() in file sys/boot/common/commands.c there is a resource leak of file descriptor hfd. Although the file descriptor is initialized in line 135, it is not closed.
>How-To-Repeat:
N/A
>Fix:
Patch attached.
Patch attached with submission follows:
--- ./sys/boot/common/commands.c.orig 2009-08-27 16:11:44.000000000 +0300
+++ ./sys/boot/common/commands.c 2009-08-27 16:22:06.000000000 +0300
@@ -150,6 +150,7 @@
break;
default:
command_errmsg = "usage is 'help <topic> [<subtopic>]";
+ close(hfd);
return(CMD_ERROR);
}
>Release-Note:
>Audit-Trail:
>Unformatted:
_______________________________________________
freebsd-bugs@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-bugs
To unsubscribe, send any mail to "freebsd-bugs-unsubscribe@freebsd.org"