autofs-5.1.1 - fix create_client() RPC client handling

The autofs socket minimization strategy is to reuse the socket
descriptor when creating an RPC client for the same protocol.

But in create_client() there is a case where the socket descriptor
can be obtained from RPC client, the RPC client destroyed, but
not cleared in the persistent data structure.

In create_client(), once an attempt is done to get the socket
descriptor, the RPC client should always be destroyed and cleared
in the persistent data structure.

Signed-off-by: Ian Kent <raven@themaw.net>
2 files changed