9feadf
diff -up rpcbind-0.2.0/src/pmap_svc.c.orig rpcbind-0.2.0/src/pmap_svc.c
9feadf
--- rpcbind-0.2.0/src/pmap_svc.c.orig	2017-05-11 13:15:17.199851080 -0400
9feadf
+++ rpcbind-0.2.0/src/pmap_svc.c	2017-05-11 13:15:58.573156590 -0400
9feadf
@@ -175,6 +175,7 @@ pmapproc_change(struct svc_req *rqstp /*
9feadf
 	long ans;
9feadf
 	uid_t uid;
9feadf
 	char uidbuf[32];
9feadf
+	int rc = TRUE;
9feadf
 
9feadf
 	/*
9feadf
 	 * Can't use getpwnam here. We might end up calling ourselves
9feadf
@@ -194,7 +195,8 @@ pmapproc_change(struct svc_req *rqstp /*
9feadf
 
9feadf
 	if (!svc_getargs(xprt, (xdrproc_t) xdr_pmap, (char *)&reg)) {
9feadf
 		svcerr_decode(xprt);
9feadf
-		return (FALSE);
9feadf
+		rc = FALSE;
9feadf
+		goto done;
9feadf
 	}
9feadf
 #ifdef RPCBIND_DEBUG
9feadf
 	if (debugging)
9feadf
@@ -205,7 +207,8 @@ pmapproc_change(struct svc_req *rqstp /*
9feadf
 
9feadf
 	if (!check_access(xprt, op, reg.pm_prog, PMAPVERS)) {
9feadf
 		svcerr_weakauth(xprt);
9feadf
-		return (FALSE);
9feadf
+		rc = (FALSE);
9feadf
+		goto done;
9feadf
 	}
9feadf
 
9feadf
 	rpcbreg.r_prog = reg.pm_prog;
9feadf
@@ -258,7 +261,16 @@ done_change:
9feadf
 		rpcbs_set(RPCBVERS_2_STAT, ans);
9feadf
 	else
9feadf
 		rpcbs_unset(RPCBVERS_2_STAT, ans);
9feadf
-	return (TRUE);
9feadf
+done:
9feadf
+	if (!svc_freeargs(xprt, (xdrproc_t) xdr_pmap, (char *)&reg)) {
9feadf
+		if (debugging) {
9feadf
+			(void) xlog(LOG_DEBUG, "unable to free arguments\n");
9feadf
+			if (doabort) {
9feadf
+				rpcbind_abort();
9feadf
+			}
9feadf
+		}
9feadf
+	}
9feadf
+	return (rc);
9feadf
 }
9feadf
 
9feadf
 /* ARGSUSED */
9feadf
@@ -272,15 +284,18 @@ pmapproc_getport(struct svc_req *rqstp /
9feadf
 #ifdef RPCBIND_DEBUG
9feadf
 	char *uaddr;
9feadf
 #endif
9feadf
+	int rc = TRUE;
9feadf
 
9feadf
 	if (!svc_getargs(xprt, (xdrproc_t) xdr_pmap, (char *)&reg)) {
9feadf
 		svcerr_decode(xprt);
9feadf
-		return (FALSE);
9feadf
+		rc = FALSE;
9feadf
+		goto done;
9feadf
 	}
9feadf
 
9feadf
 	if (!check_access(xprt, PMAPPROC_GETPORT, reg.pm_prog, PMAPVERS)) {
9feadf
 		svcerr_weakauth(xprt);
9feadf
-		return FALSE;
9feadf
+		rc = FALSE;
9feadf
+		goto done;
9feadf
 	}
9feadf
 
9feadf
 #ifdef RPCBIND_DEBUG
9feadf
@@ -330,21 +345,34 @@ pmapproc_getport(struct svc_req *rqstp /
9feadf
 		pmap_ipprot2netid(reg.pm_prot) ?: "<unknown>",
9feadf
 		port ? udptrans : "");
9feadf
 
9feadf
-	return (TRUE);
9feadf
+done:
9feadf
+	if (!svc_freeargs(xprt, (xdrproc_t) xdr_pmap, (char *)&reg)) {
9feadf
+		if (debugging) {
9feadf
+			(void) xlog(LOG_DEBUG, "unable to free arguments\n");
9feadf
+			if (doabort) {
9feadf
+				rpcbind_abort();
9feadf
+			}
9feadf
+		}
9feadf
+	}
9feadf
+	return (rc);
9feadf
 }
9feadf
 
9feadf
 /* ARGSUSED */
9feadf
 static bool_t
9feadf
 pmapproc_dump(struct svc_req *rqstp /*__unused*/, SVCXPRT *xprt)
9feadf
 {
9feadf
+	int rc = TRUE;
9feadf
+
9feadf
 	if (!svc_getargs(xprt, (xdrproc_t)xdr_void, NULL)) {
9feadf
 		svcerr_decode(xprt);
9feadf
-		return (FALSE);
9feadf
+		rc = FALSE;
9feadf
+		goto done;
9feadf
 	}
9feadf
 
9feadf
 	if (!check_access(xprt, PMAPPROC_DUMP, 0, PMAPVERS)) {
9feadf
 		svcerr_weakauth(xprt);
9feadf
-		return FALSE;
9feadf
+		rc = FALSE;
9feadf
+		goto done;
9feadf
 	}
9feadf
 	
9feadf
 	if ((!svc_sendreply(xprt, (xdrproc_t) xdr_pmaplist_ptr,
9feadf
@@ -354,7 +382,17 @@ pmapproc_dump(struct svc_req *rqstp /*__
9feadf
 			rpcbind_abort();
9feadf
 		}
9feadf
 	}
9feadf
-	return (TRUE);
9feadf
+
9feadf
+done:
9feadf
+	if (!svc_freeargs(xprt, (xdrproc_t) xdr_void, (char *)NULL)) {
9feadf
+		if (debugging) {
9feadf
+			(void) xlog(LOG_DEBUG, "unable to free arguments\n");
9feadf
+			if (doabort) {
9feadf
+				rpcbind_abort();
9feadf
+			}
9feadf
+		}
9feadf
+	}
9feadf
+	return (rc);
9feadf
 }
9feadf
 
9feadf
 int pmap_netid2ipprot(const char *netid)
9feadf
diff -up rpcbind-0.2.0/src/rpcb_svc_4.c.orig rpcbind-0.2.0/src/rpcb_svc_4.c
9feadf
--- rpcbind-0.2.0/src/rpcb_svc_4.c.orig	2017-05-11 13:15:17.199851080 -0400
9feadf
+++ rpcbind-0.2.0/src/rpcb_svc_4.c	2017-05-11 13:15:58.574156573 -0400
9feadf
@@ -219,7 +219,7 @@ rpcb_service_4(struct svc_req *rqstp, SV
9feadf
 		svcerr_decode(transp);
9feadf
 		if (debugging)
9feadf
 			(void) xlog(LOG_DEBUG, "rpcbind: could not decode\n");
9feadf
-		return;
9feadf
+		goto done;
9feadf
 	}
9feadf
 
9feadf
 	if (rqstp->rq_proc == RPCBPROC_SET
9feadf
diff -up rpcbind-0.2.0/src/rpcb_svc_com.c.orig rpcbind-0.2.0/src/rpcb_svc_com.c
9feadf
--- rpcbind-0.2.0/src/rpcb_svc_com.c.orig	2017-05-11 13:15:17.203851012 -0400
9feadf
+++ rpcbind-0.2.0/src/rpcb_svc_com.c	2017-05-11 13:18:58.197141434 -0400
9feadf
@@ -62,6 +62,7 @@
9feadf
 #include <stdlib.h>
9feadf
 
9feadf
 #include "rpcbind.h"
9feadf
+#include "xlog.h"
9feadf
 
9feadf
 #define RPC_BUF_MAX	65536	/* can be raised if required */
9feadf
 
9feadf
@@ -930,6 +931,14 @@ error:
9feadf
 	if (call_msg.rm_xid != 0)
9feadf
 		(void) free_slot_by_xid(call_msg.rm_xid);
9feadf
 out:
9feadf
+	if (!svc_freeargs(transp, (xdrproc_t) xdr_rmtcall_args, (char *) &a)) {
9feadf
+		if (debugging) {
9feadf
+			(void) xlog(LOG_DEBUG, "unable to free arguments\n");
9feadf
+			if (doabort) {
9feadf
+				rpcbind_abort();
9feadf
+			}
9feadf
+		}
9feadf
+	}
9feadf
 	if (local_uaddr)
9feadf
 		free(local_uaddr);
9feadf
 	if (buf_alloc)
9feadf
diff -up rpcbind-0.2.0/src/rpcb_svc.c.orig rpcbind-0.2.0/src/rpcb_svc.c
9feadf
--- rpcbind-0.2.0/src/rpcb_svc.c.orig	2017-05-11 13:15:17.199851080 -0400
9feadf
+++ rpcbind-0.2.0/src/rpcb_svc.c	2017-05-11 13:15:58.573156590 -0400
9feadf
@@ -165,7 +165,7 @@ rpcb_service_3(struct svc_req *rqstp, SV
9feadf
 		svcerr_decode(transp);
9feadf
 		if (debugging)
9feadf
 			(void) xlog(LOG_DEBUG, "rpcbind: could not decode");
9feadf
-		return;
9feadf
+		goto done;
9feadf
 	}
9feadf
 
9feadf
 	if (rqstp->rq_proc == RPCBPROC_SET