From owner-freebsd-bugs Mon Apr 30 19:10: 6 2001 Delivered-To: freebsd-bugs@hub.freebsd.org Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by hub.freebsd.org (Postfix) with ESMTP id 9A25237B424 for ; Mon, 30 Apr 2001 19:10:01 -0700 (PDT) (envelope-from gnats@FreeBSD.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.11.1/8.11.1) id f412A1C12099; Mon, 30 Apr 2001 19:10:01 -0700 (PDT) (envelope-from gnats) Received: from skippyii.compar.com (mail.compar.com [216.208.38.130]) by hub.freebsd.org (Postfix) with ESMTP id A51F037B422 for ; 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 ; 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)" To: Subject: bin/27001: Memory leak in usr.sbin/arp/arp.c Sender: owner-freebsd-bugs@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org >Number: 27001 >Category: bin >Synopsis: repetitive useage of arp will leak memory >Confidential: no >Severity: serious >Priority: medium >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Mon Apr 30 19:10:01 PDT 2001 >Closed-Date: >Last-Modified: >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: >Unformatted: To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message