From 61a8945649eced6c490a92e6533c5fb3a9d9a1d3 Mon Sep 17 00:00:00 2001 From: Amar Tumballi Date: Thu, 18 Nov 2010 06:21:55 +0000 Subject: 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 Signed-off-by: Anand V. Avati BUG: 2122 () URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2122 --- rpc/rpc-lib/src/rpc-clnt.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'rpc') 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); -- cgit