From gsi@skippyii.compar.com  Mon Apr 30 19:02:53 2001
Return-Path: <gsi@skippyii.compar.com>
Received: from skippyii.compar.com (mail.compar.com [216.208.38.130])
	by hub.freebsd.org (Postfix) with ESMTP id A51F037B422
	for <FreeBSD-gnats-submit@freebsd.org>; Mon, 30 Apr 2001 19:02:52 -0700 (PDT)
	(envelope-from gsi@skippyii.compar.com)
Received: from localhost (gsi@localhost)
	by skippyii.compar.com (8.11.3/8.11.3) with ESMTP id f4127sV04354
	for <FreeBSD-gnats-submit@freebsd.org>; Mon, 30 Apr 2001 22:07:54 -0400 (EDT)
	(envelope-from gsi@skippyii.compar.com)
Message-Id: <20010430220719.G4351-100000@skippyii.compar.com>
Date: Mon, 30 Apr 2001 22:07:52 -0400 (EDT)
From: "GSI Computer Services (Matt Emmerton)" <gsi@skippyii.compar.com>
To: <FreeBSD-gnats-submit@freebsd.org>
Subject: Memory leak in usr.sbin/arp/arp.c

>Number:         27001
>Category:       bin
>Synopsis:       repetitive useage of arp will leak memory
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    yar
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Mon Apr 30 19:10:01 PDT 2001
>Closed-Date:    Thu May 24 00:26:41 PDT 2001
>Last-Modified:  Thu May 24 00:28:20 PDT 2001
>Originator:     Matt Emmerton
>Release:        FreeBSD 4.3-STABLE i386
>Organization:
GSI Computer Services
>Environment:

gabby.gsicomp.on.ca 4.3-RC FreeBSD 4.3-RC #1: Wed Apr 11 00:54:11 EDT 2001

>Description:

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.

>How-To-Repeat:

Use 'arp' many times and notice that memory usage increases.

>Fix:

--- 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);
 }

 /*


>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->analyzed 
State-Changed-By: yar 
State-Changed-When: Wed May 2 12:11:57 PDT 2001 
State-Changed-Why:  
Fixed in -current, thanx. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=27001 
Responsible-Changed-From-To: freebsd-bugs->yar 
Responsible-Changed-By: yar 
Responsible-Changed-When: Wed May 2 12:13:05 PDT 2001 
Responsible-Changed-Why:  
I'll fix it. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=27001 
State-Changed-From-To: analyzed->closed 
State-Changed-By: yar 
State-Changed-When: Thu May 24 00:26:41 PDT 2001 
State-Changed-Why:  
Fixed in -stable, too. 

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