[PATCH] RPC: Make rpc_create_client() destroy the transport on failure.
[linux-2.6.git] / fs / lockd / host.c
index 52707c5ad6ea7d7e56a2e90a69e0a9375504e203..90a62f27914c737757937e68dedf5f6abe0e7823 100644 (file)
@@ -193,10 +193,8 @@ nlm_bind_host(struct nlm_host *host)
                /* Existing NLM servers accept AUTH_UNIX only */
                clnt = rpc_create_client(xprt, host->h_name, &nlm_program,
                                        host->h_version, RPC_AUTH_UNIX);
-               if (IS_ERR(clnt)) {
-                       xprt_destroy(xprt);
+               if (IS_ERR(clnt))
                        goto forgetit;
-               }
                clnt->cl_autobind = 1;  /* turn on pmap queries */
                xprt->nocong = 1;       /* No congestion control for NLM */
                xprt->resvport = 1;     /* NLM requires a reserved port */