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>
This commit is contained in:
Raghavendra Bhat 2013-01-10 13:06:21 +05:30 committed by Vijay Bellur
parent a65a482dc2
commit fba70e641e

View File

@ -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);