Bug 27001

Summary: repetitive useage of arp will leak memory
Product: Base System Reporter: GSI Computer Services <gsi>
Component: binAssignee: Yar Tikhiy <yar>
Status: Closed FIXED    
Severity: Affects Only Me    
Priority: Normal    
Version: 4.3-STABLE   
Hardware: Any   
OS: Any   

Description GSI Computer Services 2001-05-01 03:10:01 UTC
In the function search() of arp.c, malloc() is called without a
corresponding free() statement.

Props to 'alex' (ml-freebsd-net@phobgate.de) for pointing this out.

Fix: 

/*--o52skyRS6lPku5rp6FeULr8efQysUkGdTk15Eddwc5dVzQd6
Content-Type: text/plain; name="file.diff"
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment; filename="file.diff"

--- usr.sbin/arp/arp.c.orig Mon Apr 30 21:42:18 2001
+++ usr.sbin/arp/arp.c Mon Apr 30 21:42:50 2001
@@ -460,6 +460,7 @@
  }
  (*action)(sdl, sin, rtm);
  }
+ free(buf);
 }
How-To-Repeat: 
Use 'arp' many times and notice that memory usage increases.
Comment 1 Yar Tikhiy freebsd_committer freebsd_triage 2001-05-02 20:11:57 UTC
State Changed
From-To: open->analyzed

Fixed in -current, thanx.
Comment 2 Yar Tikhiy freebsd_committer freebsd_triage 2001-05-02 20:13:05 UTC
Responsible Changed
From-To: freebsd-bugs->yar

I'll fix it.
Comment 3 Yar Tikhiy freebsd_committer freebsd_triage 2001-05-24 08:26:41 UTC
State Changed
From-To: analyzed->closed

Fixed in -stable, too.