Call clnt_destroy() to prevent exhausting resources.

PR:		bin/14255
Reviewed by:	Kenji Tomita <tommy@ti.com>
MFC after:	2 weeks
This commit is contained in:
Mike Heffner 2001-06-19 03:48:26 +00:00
parent 98f858a6b2
commit b1a7433e0b
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=78456
2 changed files with 3 additions and 0 deletions

View File

@ -176,11 +176,13 @@ onehost(char *host)
tv.tv_usec = 0;
if (clnt_call(rstat_clnt, RSTATPROC_STATS, xdr_void, NULL, xdr_statstime, &host_stat, tv) != RPC_SUCCESS) {
warnx("%s: %s", host, clnt_sperror(rstat_clnt, host));
clnt_destroy(rstat_clnt);
return(-1);
}
addr.sin_addr.s_addr = *(int *)hp->h_addr;
rstat_reply((caddr_t)&host_stat, &addr);
clnt_destroy(rstat_clnt);
return (0);
}

View File

@ -191,6 +191,7 @@ onehost(char *host)
errx(1, "%s", clnt_sperror(rusers_clnt, ""));
addr.sin_addr.s_addr = *(int *)hp->h_addr;
rusers_reply((caddr_t)&up, &addr);
clnt_destroy(rusers_clnt);
}
void