diff options
Diffstat (limited to 'xlators/protocol/server/src/server-helpers.c')
| -rw-r--r-- | xlators/protocol/server/src/server-helpers.c | 3 | 
1 files changed, 3 insertions, 0 deletions
diff --git a/xlators/protocol/server/src/server-helpers.c b/xlators/protocol/server/src/server-helpers.c index 37418ac1de4..84c66d1141d 100644 --- a/xlators/protocol/server/src/server-helpers.c +++ b/xlators/protocol/server/src/server-helpers.c @@ -684,6 +684,8 @@ server_connection_get (xlator_t *this, const char *id)                  if (!conn) {                          conn = (void *) GF_CALLOC (1, sizeof (*conn),                                                     gf_server_mt_conn_t); +                        if (!conn) +                                goto unlock;                          conn->id = gf_strdup (id);                          conn->fdtable = gf_fd_fdtable_alloc (); @@ -697,6 +699,7 @@ server_connection_get (xlator_t *this, const char *id)                  conn->ref++;                  conn->active_transports++;  	} +unlock:  	pthread_mutex_unlock (&conf->mutex);          return conn;  | 
