summaryrefslogtreecommitdiffstats
path: root/rpc/rpc-lib/src/rpc-clnt.c
diff options
context:
space:
mode:
Diffstat (limited to 'rpc/rpc-lib/src/rpc-clnt.c')
-rw-r--r--rpc/rpc-lib/src/rpc-clnt.c15
1 files changed, 8 insertions, 7 deletions
diff --git a/rpc/rpc-lib/src/rpc-clnt.c b/rpc/rpc-lib/src/rpc-clnt.c
index 20981ef9c9c..264a3120a46 100644
--- a/rpc/rpc-lib/src/rpc-clnt.c
+++ b/rpc/rpc-lib/src/rpc-clnt.c
@@ -724,7 +724,7 @@ rpc_clnt_handle_cbk (struct rpc_clnt *clnt, rpc_transport_pollin_t *msg)
}
out:
- clnt = rpc_clnt_unref (clnt);
+ rpc_clnt_unref (clnt);
return ret;
}
@@ -774,7 +774,7 @@ out:
mem_put (saved_frame);
}
- clnt = rpc_clnt_unref (clnt);
+ rpc_clnt_unref (clnt);
return ret;
}
@@ -1455,11 +1455,12 @@ rpcclnt_cbk_program_register (struct rpc_clnt *clnt,
program->progver);
out:
- if (ret == -1) {
- gf_log (clnt->conn.name, GF_LOG_ERROR,
- "Program registration failed:"
- " %s, Num: %d, Ver: %d", program->progname,
- program->prognum, program->progver);
+ if (ret == -1 && clnt) {
+ gf_log (clnt->conn.name, GF_LOG_ERROR,
+ "Program registration failed:"
+ " %s, Num: %d, Ver: %d",
+ program->progname,
+ program->prognum, program->progver);
}
return ret;