Dont dereference NULL xdr_results proc.

The assumption is that either there is nothing to decode (SUCCESS),
or else we just need to avoid the illegal reference.

Coverity CID 18112.

Signed-off-by: Matt Benjamin <matt@linuxbox.com>
Add annotation about "(u_int) -1" returns from XDR_GETPOS.

Coverity CIDs 18155, 18156, 18157, 18158, 18159.

Signed-off-by: Matt Benjamin <matt@linuxbox.com>
Don't leak ret in __rpc_taddr2uaddr_af.

The function is supposed to return a filled buffer.  Free the
buffer if the function would return NULL instead.

Signed-off-by: Matt Benjamin <matt@linuxbox.com>
Set auth handle in rpcb_taddr2uaddr.

Supposedly never called, it still needs the singleton auth_none
handle.

Coverity CID 18292.

Signed-off-by: Matt Benjamin <matt@linuxbox.com>
Fix lock order reversal in svc_xprt_shutdown.

The xprt teardown code in svc_xprt_shutdown violated the xprt->lock,
t->lock lock order.  Fix it by dropping t->lock across SVC_DESTROY,
then restarting the traversal which retakes t->lock.

Coverity CID 18358.

Signed-off-by: Matt Benjamin <matt@linuxbox.com>
Fix invalid use of SVC_XPRT_FLAG_MUTEX_LOCKED flag.

In this call path, xprt->xp_lock has been indirectly released
by a call to SVC_RELEASE.

Coverity CID 23131.

Signed-off-by: Matt Benjamin <matt@linuxbox.com>
Release clnt locks before disposing (bidi).

If svc_vc_ncreate_clnt is instructed to close the client handle, it needs
to drop clnt locks first.  Fix submitted.

Coverity CID 24286.

Signed-off-by: Matt Benjamin <matt@linuxbox.com>