Clean up: call clnt_destroy() in the showmount command as needed to
destroy the RPC client properly (and close the associated socket) before
the program exits.
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Steve Dickson <steved@redhat.com>
total_timeout);
if (clnt_stat != RPC_SUCCESS) {
clnt_perror(mclient, "rpc mount export");
+ clnt_destroy(mclient);
exit(1);
}
if (headers)
printf("\n");
exportlist = exportlist->ex_next;
}
+ clnt_destroy(mclient);
exit(0);
}
total_timeout);
if (clnt_stat != RPC_SUCCESS) {
clnt_perror(mclient, "rpc mount dump");
+ clnt_destroy(mclient);
exit(1);
}
+ clnt_destroy(mclient);
n = 0;
for (list = dumplist; list; list = list->ml_next)