From owner-svn-src-stable@FreeBSD.ORG Tue Jan 17 20:56:12 2012 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E2C12106564A; Tue, 17 Jan 2012 20:56:12 +0000 (UTC) (envelope-from hrs@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D0D928FC16; Tue, 17 Jan 2012 20:56:12 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q0HKuC1U007262; Tue, 17 Jan 2012 20:56:12 GMT (envelope-from hrs@svn.freebsd.org) Received: (from hrs@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q0HKuC1r007260; Tue, 17 Jan 2012 20:56:12 GMT (envelope-from hrs@svn.freebsd.org) Message-Id: <201201172056.q0HKuC1r007260@svn.freebsd.org> From: Hiroki Sato Date: Tue, 17 Jan 2012 20:56:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r230280 - stable/9/usr.sbin/ypserv X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 17 Jan 2012 20:56:13 -0000 Author: hrs Date: Tue Jan 17 20:56:12 2012 New Revision: 230280 URL: http://svn.freebsd.org/changeset/base/230280 Log: MFC: Revert changes in r229899. The ypserv daemon could not work with multiple socktypes due to it. Modified: stable/9/usr.sbin/ypserv/yp_main.c Directory Properties: stable/9/usr.sbin/ypserv/ (props changed) Modified: stable/9/usr.sbin/ypserv/yp_main.c ============================================================================== --- stable/9/usr.sbin/ypserv/yp_main.c Tue Jan 17 20:39:33 2012 (r230279) +++ stable/9/usr.sbin/ypserv/yp_main.c Tue Jan 17 20:56:12 2012 (r230280) @@ -255,7 +255,6 @@ create_service(const int sock, const str const struct __rpc_sockinfo *si) { int error; - char *sname; SVCXPRT *transp; struct addrinfo hints, *res, *res0; @@ -263,7 +262,6 @@ create_service(const int sock, const str struct bindaddrlistent *blep; struct netbuf svcaddr; - sname = NULL; SLIST_INIT(&sle_head); memset(&hints, 0, sizeof(hints)); memset(&svcaddr, 0, sizeof(svcaddr)); @@ -343,6 +341,7 @@ create_service(const int sock, const str if (strncmp("0", servname, 1) == 0) { struct sockaddr *sap; socklen_t slen; + char *sname; sname = malloc(NI_MAXSERV); if (sname == NULL) { @@ -443,7 +442,6 @@ create_service(const int sock, const str } /* XXX: ignore error intentionally */ rpcb_set(YPPROG, YPVERS, nconf, &svcaddr); - free(sname); freeaddrinfo(res0); return 0; }