From owner-cvs-lib Sat Mar 16 13:26:18 1996 Return-Path: owner-cvs-lib Received: (from root@localhost) by freefall.freebsd.org (8.7.3/8.7.3) id NAA02291 for cvs-lib-outgoing; Sat, 16 Mar 1996 13:26:18 -0800 (PST) Received: (from wpaul@localhost) by freefall.freebsd.org (8.7.3/8.7.3) id NAA02271 Sat, 16 Mar 1996 13:26:02 -0800 (PST) Date: Sat, 16 Mar 1996 13:26:02 -0800 (PST) From: Bill Paul Message-Id: <199603162126.NAA02271@freefall.freebsd.org> To: CVS-committers, cvs-all, cvs-lib Subject: cvs commit: src/lib/libc/net gethostbynis.c ether_addr.c Sender: owner-cvs-lib@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk wpaul 96/03/16 13:26:01 Modified: lib/libc/net gethostbynis.c ether_addr.c Log: gethostbynis.c: - Fix problem described in PR #1079: _gethostbynisaddr() doesn't work. Make it accept the same arguments as all the other gethostby*addr() functions and properly convert the supplied IP address into a text string so that yp_match() can find it in the hosts.byaddr map. - Also fix potential memory leak: copy the results of yp_match() to a static buffer and free the result (yp_match() returns dynamically allocated memory). ether_addr.c: - Since I was in the neighborhood, fix ether_ntohost() and ether_hostton() so that they don't bogusly for a free(result) when yp_match() fails. Revision Changes Path 1.2 +18 -5 src/lib/libc/net/gethostbynis.c 1.3 +1 -3 src/lib/libc/net/ether_addr.c