From owner-freebsd-hackers Fri Sep 12 14:53:05 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.7/8.8.7) id OAA12305 for hackers-outgoing; Fri, 12 Sep 1997 14:53:05 -0700 (PDT) Received: from mexico.brainstorm.eu.org (root@mexico.brainstorm.fr [193.56.58.253]) by hub.freebsd.org (8.8.7/8.8.7) with ESMTP id OAA12288; Fri, 12 Sep 1997 14:52:59 -0700 (PDT) Received: from brasil.brainstorm.eu.org (brasil.brainstorm.fr [193.56.58.33]) by mexico.brainstorm.eu.org (8.8.4/8.8.4) with ESMTP id XAA24245; Fri, 12 Sep 1997 23:52:56 +0200 Received: (from uucp@localhost) by brasil.brainstorm.eu.org (8.8.6/brasil-1.2) with UUCP id XAA18321; Fri, 12 Sep 1997 23:52:28 +0200 Received: (from roberto@localhost) by keltia.freenix.fr (8.8.7/keltia-uucp-2.10/nospam) id XAA15465; Fri, 12 Sep 1997 23:37:28 +0200 (CEST) Message-ID: <19970912233728.62622@keltia.freenix.fr> Date: Fri, 12 Sep 1997 23:37:28 +0200 From: Ollivier Robert To: hackers@FreeBSD.ORG, freebsd-bugs@FreeBSD.ORG Subject: Re: Memory leak in getservbyXXX? References: <199709121302.PAA20383@cdsec.com> <199709121309.XAA03107@word.smith.net.au> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 0.76 In-Reply-To: <199709121309.XAA03107@word.smith.net.au>; from Mike Smith on Fri, Sep 12, 1997 at 10:39:19PM +0930 X-Operating-System: FreeBSD 3.0-CURRENT ctm#3634 AMD-K6 MMX @ 208 MHz Sender: owner-freebsd-hackers@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk According to Mike Smith: > 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( getservbyport(3) expects the port to be in network order and using if (getservbyport (htons(23), NULL) == NULL) { leads to a working program. On my CURRENT system, there doesn't seem to be any memory leak. -- Ollivier ROBERT -=- FreeBSD: There are no limits -=- roberto@keltia.freenix.fr FreeBSD keltia.freenix.fr 3.0-CURRENT #31: Sat Sep 6 21:58:17 CEST 1997