Subject: misc/22479: Memory leak in arp
To: None <gnats-bugs@gnats.NetBSD.org>
From: None <bo@helleskov.dk>
List: netbsd-bugs
Date: 08/14/2003 09:46:32
>Number: 22479
>Category: misc
>Synopsis: Memory leak in arp
>Confidential: no
>Severity: serious
>Priority: low
>Responsible: misc-bug-people
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Thu Aug 14 09:47:00 UTC 2003
>Closed-Date:
>Last-Modified:
>Originator: Bo Helleskov
>Release: 1.6.1_STABLE
>Organization:
>Environment:
NetBSD zilliger.helleskov.dk 1.6.1_STABLE NetBSD 1.6.1_STABLE (GENERIC) #0: Wed Aug 6 21:22:53 CEST 2003 root@zilliger.helleskov.dk:/usr/src/sys/arch/i386/compile/GENERIC i386
>Description:
The arp command allocates memory in two places. In line 415 and and line 490, but it never calls free.
>How-To-Repeat:
Since arp only allocates a low amount of memory (on my machine if was 674 bytes) you need to run it a couple of hundred thousand times to watch how memory start to disappear.
>Fix:
I've created a patch that works aginst the latest version of arp, version 1.38
462a463
> free(buf);
501a503
> free(buf);
>Release-Note:
>Audit-Trail:
>Unformatted: