diff options
author | Emmanuel Dreyfus <manu@netbsd.org> | 2014-07-31 05:37:37 +0200 |
---|---|---|
committer | Raghavendra G <rgowdapp@redhat.com> | 2014-08-04 02:09:29 -0700 |
commit | 6ff2fd2e05c35562cf9505b95d191ee7fe001823 (patch) | |
tree | c559e711f740dafac027db0c1d3d3160202f517a /rpc/rpc-lib/src | |
parent | 36a6652f5d458c2ce0a734e11586a623848f991c (diff) |
Do not call rpc_transport_unref() on NULL trans
rpc_clnt_disable() sets rpc->conn->trans to NULL, hence we should not
call rpc_transport_unref() afterwards. I moved it before the
rpc_clnt_disable() call, but I am not sure it should be called at all,
perhaps it should just go away.
BUG: 764655
Change-Id: I488d0207494e3a3fad52e64e67b2e740b236b864
Signed-off-by: Emmanuel Dreyfus <manu@netbsd.org>
Reviewed-on: http://review.gluster.org/8393
Reviewed-by: Harshavardhana <harsha@harshavardhana.net>
Reviewed-by: Raghavendra G <rgowdapp@redhat.com>
Tested-by: Raghavendra G <rgowdapp@redhat.com>
Diffstat (limited to 'rpc/rpc-lib/src')
-rw-r--r-- | rpc/rpc-lib/src/rpc-clnt.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/rpc/rpc-lib/src/rpc-clnt.c b/rpc/rpc-lib/src/rpc-clnt.c index 2ae2dfb71bf..4c8333b7d5d 100644 --- a/rpc/rpc-lib/src/rpc-clnt.c +++ b/rpc/rpc-lib/src/rpc-clnt.c @@ -1623,14 +1623,16 @@ rpc_clnt_ref (struct rpc_clnt *rpc) static void rpc_clnt_trigger_destroy (struct rpc_clnt *rpc) { - rpc_clnt_connection_t *conn = NULL; + rpc_clnt_connection_t *conn = NULL; + rpc_transport_t *trans = NULL; if (!rpc) return; conn = &rpc->conn; + trans = conn->trans; rpc_clnt_disable (rpc); - rpc_transport_unref (conn->trans); + rpc_transport_unref (trans); } static void |