summaryrefslogtreecommitdiffstats
path: root/rpc/rpc-lib
diff options
context:
space:
mode:
authorAmar Tumballi <amar@gluster.com>2010-11-18 06:21:55 +0000
committerAnand V. Avati <avati@dev.gluster.com>2010-11-18 05:55:47 -0800
commit61a8945649eced6c490a92e6533c5fb3a9d9a1d3 (patch)
treec9320a164de418e2bc6e6a2f6e98d1328cf43996 /rpc/rpc-lib
parent9c80f63d8264718c5855f1f6cca9e5a801392ed3 (diff)
rpc-clnt: add check for NULL argument for rpc_clnt_start
prevents crash when rpc_clnt_start is called before init Signed-off-by: Amar Tumballi <amar@gluster.com> Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 2122 () URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2122
Diffstat (limited to 'rpc/rpc-lib')
-rw-r--r--rpc/rpc-lib/src/rpc-clnt.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/rpc/rpc-lib/src/rpc-clnt.c b/rpc/rpc-lib/src/rpc-clnt.c
index 58e00d44a6c..34e0efb030f 100644
--- a/rpc/rpc-lib/src/rpc-clnt.c
+++ b/rpc/rpc-lib/src/rpc-clnt.c
@@ -1085,6 +1085,9 @@ rpc_clnt_start (struct rpc_clnt *rpc)
{
struct rpc_clnt_connection *conn = NULL;
+ if (!rpc)
+ return -1;
+
conn = &rpc->conn;
rpc_clnt_reconnect (conn->trans);