diff options
-rw-r--r-- | lib/libc/rpc/rpcb_clnt.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/libc/rpc/rpcb_clnt.c b/lib/libc/rpc/rpcb_clnt.c index 6ad34f3..d70aaec 100644 --- a/lib/libc/rpc/rpcb_clnt.c +++ b/lib/libc/rpc/rpcb_clnt.c @@ -298,6 +298,7 @@ getclnthandle(host, nconf, targaddr) /* VARIABLES PROTECTED BY rpcbaddr_cache_lock: ad_cache */ /* Get the address of the rpcbind. Check cache first */ + client = NULL; addr_to_delete.len = 0; rwlock_rdlock(&rpcbaddr_cache_lock); ad_cache = check_cache(host, nconf->nc_netid); @@ -938,6 +939,8 @@ done: } else if (client) { CLNT_DESTROY(client); } + if (parms.r_addr != NULL && parms.r_addr != nullstring) + free(parms.r_addr); return (address); } @@ -1056,7 +1059,7 @@ rpcb_rmtcall(nconf, host, prog, vers, proc, xdrargs, argsp, struct r_rpcb_rmtcallres r; rpcvers_t rpcb_vers; - + stat = 0; client = getclnthandle(host, nconf, NULL); if (client == NULL) { return (RPC_FAILED); |