Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 17 Jan 2012 20:56:12 +0000 (UTC)
From:      Hiroki Sato <hrs@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org
Subject:   svn commit: r230280 - stable/9/usr.sbin/ypserv
Message-ID:  <201201172056.q0HKuC1r007260@svn.freebsd.org>

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



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