always destroy the rpc client in nfsping
This commit is contained in:
parent
c9287bfccc
commit
d1a6e3e143
|
@ -435,7 +435,7 @@ int sigar_nfsping(char *host)
|
||||||
{
|
{
|
||||||
CLIENT *client;
|
CLIENT *client;
|
||||||
struct sockaddr_in addr;
|
struct sockaddr_in addr;
|
||||||
int sock;
|
int sock, retval=1;
|
||||||
struct timeval timeout, interval;
|
struct timeval timeout, interval;
|
||||||
unsigned short port = 0;
|
unsigned short port = 0;
|
||||||
char buffer[1024];
|
char buffer[1024];
|
||||||
|
@ -463,11 +463,11 @@ int sigar_nfsping(char *host)
|
||||||
|
|
||||||
if (rpc_stat != RPC_SUCCESS) {
|
if (rpc_stat != RPC_SUCCESS) {
|
||||||
clnt_perror(client, buffer);
|
clnt_perror(client, buffer);
|
||||||
clnt_destroy(client);
|
retval = 0;
|
||||||
return 0;
|
|
||||||
}
|
}
|
||||||
|
clnt_destroy(client);
|
||||||
|
|
||||||
return 1;
|
return retval;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue