Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 12 Sep 1997 23:37:28 +0200
From:      Ollivier Robert <roberto@keltia.freenix.fr>
To:        hackers@FreeBSD.ORG, freebsd-bugs@FreeBSD.ORG
Subject:   Re: Memory leak in getservbyXXX?
Message-ID:  <19970912233728.62622@keltia.freenix.fr>
In-Reply-To: <199709121309.XAA03107@word.smith.net.au>; from Mike Smith on Fri, Sep 12, 1997 at 10:39:19PM %2B0930
References:  <199709121302.PAA20383@cdsec.com> <199709121309.XAA03107@word.smith.net.au>

next in thread | previous in thread | raw e-mail | index | archive | help
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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?19970912233728.62622>