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;
 }
_______________________________________________
[email protected] mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "[email protected]"

Reply via email to