Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 17 Jan 2012 20:39:34 +0000 (UTC)
From:      Hiroki Sato <hrs@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r230279 - head/usr.sbin/ypserv
Message-ID:  <201201172039.q0HKdYPB006687@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: hrs
Date: Tue Jan 17 20:39:33 2012
New Revision: 230279
URL: http://svn.freebsd.org/changeset/base/230279

Log:
  Revert changes in r228790.  It prevented the ypserv daemon from working with
  with multiple socktypes.

Modified:
  head/usr.sbin/ypserv/yp_main.c

Modified: head/usr.sbin/ypserv/yp_main.c
==============================================================================
--- head/usr.sbin/ypserv/yp_main.c	Tue Jan 17 20:22:10 2012	(r230278)
+++ head/usr.sbin/ypserv/yp_main.c	Tue Jan 17 20:39:33 2012	(r230279)
@@ -256,7 +256,6 @@ create_service(const int sock, const str
 	const struct __rpc_sockinfo *si)
 {
 	int error;
-	char *sname;
 
 	SVCXPRT *transp;
 	struct addrinfo hints, *res, *res0;
@@ -264,7 +263,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));
@@ -344,6 +342,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) {
@@ -444,7 +443,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?201201172039.q0HKdYPB006687>