Bug 12769

Summary: Memory leak in init(8)
Product: Base System Reporter: Peter Jeremy <jeremyp>
Component: binAssignee: freebsd-bugs (Nobody) <bugs>
Status: Closed FIXED    
Severity: Affects Only Me    
Priority: Normal    
Version: 4.0-CURRENT   
Hardware: Any   
OS: Any   
Attachments:
Description Flags
file.diff none

Description Peter Jeremy 1999-07-23 05:20:00 UTC
	If init is unable to parse the getty or window command line, it
	doesn't free the memory it allocated to contain the argv pointers
	(allocated at 1 more than half the length of the command line).

How-To-Repeat: 
	Found by code inspection.

	An /etc/ttys containing the following line:
tty99 "                                                              " cons25 on secure
	should leak 128 bytes on every SIGHUP.  Enough similar lines and
	enough SIGHUPs show a detectable increase in process size.
Comment 1 ru freebsd_committer freebsd_triage 1999-07-23 09:30:55 UTC
State Changed
From-To: open->closed

Suggested patch applied in both CURRENT and STABLE, thanks!