summaryrefslogtreecommitdiffstats
path: root/xlators/protocol
diff options
context:
space:
mode:
authorRaghavendra Bhat <raghavendra@redhat.com>2013-01-10 13:06:21 +0530
committerVijay Bellur <vbellur@redhat.com>2013-01-16 09:52:31 -0800
commitfba70e641eb52c90fa29fc26d916e4607e286779 (patch)
tree03e9bea6c8093906afd41be3738bab32d77abe76 /xlators/protocol
parenta65a482dc2f09de3e1115c593864248522eea29e (diff)
protocol/server: do server_connection_put only if bound_xl is NULL
If getting bound_xl fails, then while putting the connection back we should also check for bound_xl pointer for NULL apart from the op_ret and the connection object. We were checking just op_ret and conn pointer till now and if the mount from a machine is not allowed as auth.allow did not permit it, then also we were destroying the connection object. Change-Id: Iac43e8dc078d905edafb44d6670f88989a8f82a3 BUG: 881062 Signed-off-by: Raghavendra Bhat <raghavendra@redhat.com> Reviewed-on: http://review.gluster.org/4373 Reviewed-by: Amar Tumballi <amarts@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com>
Diffstat (limited to 'xlators/protocol')
-rw-r--r--xlators/protocol/server/src/server-handshake.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/xlators/protocol/server/src/server-handshake.c b/xlators/protocol/server/src/server-handshake.c
index 523c530..cebc135 100644
--- a/xlators/protocol/server/src/server-handshake.c
+++ b/xlators/protocol/server/src/server-handshake.c
@@ -673,7 +673,7 @@ fail:
* list of connections the server is maintaining and might segfault
* during statedump when bound_xl of the connection is accessed.
*/
- if (op_ret && conn)
+ if (op_ret && conn && !xl)
server_connection_put (this, conn, NULL);
server_submit_reply (NULL, req, &rsp, NULL, 0, NULL,
(xdrproc_t)xdr_gf_setvolume_rsp);