From owner-freebsd-bugs Fri Sep 12 06:41:35 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.7/8.8.7) id GAA03502 for bugs-outgoing; Fri, 12 Sep 1997 06:41:35 -0700 (PDT) Received: from word.smith.net.au (word.smith.net.au [202.0.75.3]) by hub.freebsd.org (8.8.7/8.8.7) with ESMTP id GAA03488; Fri, 12 Sep 1997 06:41:30 -0700 (PDT) Received: from word.smith.net.au (localhost.smith.net.au [127.0.0.1]) by word.smith.net.au (8.8.7/8.8.5) with ESMTP id XAA03107; Fri, 12 Sep 1997 23:09:20 +1000 (EST) Message-Id: <199709121309.XAA03107@word.smith.net.au> X-Mailer: exmh version 2.0zeta 7/24/97 To: Graham Wheeler cc: mike@smith.net.au (Mike Smith), hackers@freebsd.org, freebsd-bugs@freebsd.org Subject: Re: Memory leak in getservbyXXX? In-reply-to: Your message of "Sat, 12 Sep 1997 15:02:30 +0200." <199709121302.PAA20383@cdsec.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Fri, 12 Sep 1997 22:39:19 +0930 From: Mike Smith Sender: owner-freebsd-bugs@freebsd.org X-Loop: FreeBSD.org Precedence: bulk > > If the problem is a memory leak in the stdio stuff, then it seems a > reasonable assumption that if I do a setservent(1) at the start, that > the problem will be circumvented, do you agree? Presuming that the bug has to do with the open/close allocation, that sounds pretty reasonable to me. Forgive me my confusion, but the following fragment here (I thought I should try to reproduce your leak) doesn't appear to behave as I would expect : #include #include void main(void) { for (;;) if (getservbyport(23, NULL) == NULL) { fprintf(stderr, "argh!\n"); exit(1); } } ie. it exits immediately. I tried various assortments of parameters (eg. network and native order on the port, NULL, "tcp", "udp", etc for the protocol). 8( mike