summaryrefslogtreecommitdiffstats
path: root/usr.sbin
diff options
context:
space:
mode:
authorhrs <hrs@FreeBSD.org>2012-01-17 20:39:33 +0000
committerhrs <hrs@FreeBSD.org>2012-01-17 20:39:33 +0000
commit1ec0cafe1b927718cf2791cd6c6fd24c3a06040b (patch)
tree247d69c929fe76ee0018a852cd24d92a5c9fc6f1 /usr.sbin
parent55f99993c3e72dbb60d426ffd874ed7544625b5d (diff)
downloadFreeBSD-src-1ec0cafe1b927718cf2791cd6c6fd24c3a06040b.zip
FreeBSD-src-1ec0cafe1b927718cf2791cd6c6fd24c3a06040b.tar.gz
Revert changes in r228790. It prevented the ypserv daemon from working with
with multiple socktypes.
Diffstat (limited to 'usr.sbin')
-rw-r--r--usr.sbin/ypserv/yp_main.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/usr.sbin/ypserv/yp_main.c b/usr.sbin/ypserv/yp_main.c
index 569e558..69dae29 100644
--- a/usr.sbin/ypserv/yp_main.c
+++ b/usr.sbin/ypserv/yp_main.c
@@ -256,7 +256,6 @@ create_service(const int sock, const struct netconfig *nconf,
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 struct netconfig *nconf,
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 struct netconfig *nconf,
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 struct netconfig *nconf,
}
/* XXX: ignore error intentionally */
rpcb_set(YPPROG, YPVERS, nconf, &svcaddr);
- free(sname);
freeaddrinfo(res0);
return 0;
}
OpenPOWER on IntegriCloud