b52932
diff -up libtirpc-0.2.4/src/svc_generic.c.orig libtirpc-0.2.4/src/svc_generic.c
b52932
--- libtirpc-0.2.4/src/svc_generic.c.orig	2013-12-09 15:59:51.000000000 -0500
b52932
+++ libtirpc-0.2.4/src/svc_generic.c	2015-06-29 10:20:27.239019533 -0400
b52932
@@ -283,6 +283,8 @@ svc_tli_create(fd, nconf, bindaddr, send
b52932
 	xprt->xp_type = __rpc_socktype2seman(si.si_socktype);
b52932
 
b52932
 	if (nconf) {
b52932
+		if (xprt->xp_netid != NULL)
b52932
+			free(xprt->xp_netid);
b52932
 		xprt->xp_netid = strdup(nconf->nc_netid);
b52932
 		xprt->xp_tp = strdup(nconf->nc_device);
b52932
 	}
b52932
diff -up libtirpc-0.2.4/src/svc_vc.c.orig libtirpc-0.2.4/src/svc_vc.c
b52932
--- libtirpc-0.2.4/src/svc_vc.c.orig	2015-06-29 10:19:21.205835483 -0400
b52932
+++ libtirpc-0.2.4/src/svc_vc.c	2015-06-29 10:20:34.616151809 -0400
b52932
@@ -393,6 +393,12 @@ svc_vc_destroy(xprt)
b52932
 	__svc_vc_dodestroy(xprt);
b52932
 }
b52932
 
b52932
+static bool_t
b52932
+__svc_rendezvous_socket(xprt)
b52932
+	SVCXPRT *xprt;
b52932
+{
b52932
+	return (xprt->xp_ops->xp_recv == rendezvous_request);
b52932
+}
b52932
 static void
b52932
 __svc_vc_dodestroy(xprt)
b52932
 	SVCXPRT *xprt;
b52932
@@ -404,7 +410,7 @@ __svc_vc_dodestroy(xprt)
b52932
 
b52932
 	if (xprt->xp_fd != RPC_ANYFD)
b52932
 		(void)close(xprt->xp_fd);
b52932
-	if (xprt->xp_port != 0) {
b52932
+	if (__svc_rendezvous_socket(xprt)) {
b52932
 		/* a rendezvouser socket */
b52932
 		r = (struct cf_rendezvous *)xprt->xp_p1;
b52932
 		mem_free(r, sizeof (struct cf_rendezvous));