nvmf: Update free_conn in conn.c

Move two statements in free_conn

Change-Id: I27f403f4d4b50be8befb75b1109cb9be9ff1a3d8
Signed-off-by: Ziye Yang <ziye.yang@intel.com>
This commit is contained in:
Ziye Yang 2016-06-08 09:41:15 +08:00 committed by Daniel Verkamp
parent 88726edf83
commit 68ea447278

View File

@ -123,6 +123,8 @@ allocate_conn(void)
static void
free_conn(struct spdk_nvmf_conn *conn)
{
conn->sess = NULL;
conn->cm_id = 0;
conn->is_valid = 0;
}
@ -303,8 +305,6 @@ _conn_destruct(spdk_event_t event)
nvmf_rdma_conn_cleanup(conn);
pthread_mutex_lock(&g_conns_mutex);
conn->sess = NULL;
conn->cm_id = 0;
free_conn(conn);
pthread_mutex_unlock(&g_conns_mutex);
}