Blame SOURCES/libtirpc-0.2.4-mem-leak.patch

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