Date: Fri, 12 Sep 1997 22:39:19 +0930 From: Mike Smith <mike@smith.net.au> To: Graham Wheeler <gram@cdsec.com> Cc: mike@smith.net.au (Mike Smith), hackers@freebsd.org, freebsd-bugs@freebsd.org Subject: Re: Memory leak in getservbyXXX? Message-ID: <199709121309.XAA03107@word.smith.net.au> In-Reply-To: Your message of "Sat, 12 Sep 1997 15:02:30 %2B0200." <199709121302.PAA20383@cdsec.com>
next in thread | previous in thread | raw e-mail | index | archive | help
> > 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 <netdb.h> #include <stdio.h> 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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199709121309.XAA03107>