diff options
| -rw-r--r-- | libglusterfs/src/client_t.c | 6 | ||||
| -rw-r--r-- | xlators/protocol/server/src/server-handshake.c | 2 |
2 files changed, 7 insertions, 1 deletions
diff --git a/libglusterfs/src/client_t.c b/libglusterfs/src/client_t.c index b7462fcaec3..a66be21a012 100644 --- a/libglusterfs/src/client_t.c +++ b/libglusterfs/src/client_t.c @@ -293,6 +293,9 @@ gf_client_put (client_t *client, gf_boolean_t *detached) gf_boolean_t unref = _gf_false; int bind_ref; + if (client == NULL) + goto out; + if (detached) *detached = _gf_false; @@ -309,6 +312,9 @@ gf_client_put (client_t *client, gf_boolean_t *detached) *detached = _gf_true; gf_client_unref (client); } + +out: + return; } client_t * diff --git a/xlators/protocol/server/src/server-handshake.c b/xlators/protocol/server/src/server-handshake.c index 4aaa933da67..89e0c1a0e13 100644 --- a/xlators/protocol/server/src/server-handshake.c +++ b/xlators/protocol/server/src/server-handshake.c @@ -705,7 +705,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 && !xl) { + if (op_ret && !xl && (client != NULL)) { /* We would have set the xl_private of the transport to the * @conn. But if we have put the connection i.e shutting down * the connection, then we should set xl_private to NULL as it |
