isert: Fix resource leak upon unreachable event

Unreachable event caused by crash of initiator while in
connection establishment flow, would cause leak of connections.

Signed-off-by: Yan Burman <yanb@mellanox.com>

git-svn-id: http://svn.code.sf.net/p/scst/svn/branches/iser@5859 d57e44dd-8a1f-0410-8b47-8ef2f437770f
This commit is contained in:
Yan Burman
2014-11-16 13:22:42 +00:00
parent 9b679522d0
commit 2cfd09c8de

View File

@@ -1079,7 +1079,6 @@ static struct isert_connection *isert_conn_create(struct rdma_cm_id *cm_id,
}
kref_init(&isert_conn->kref);
kref_get(&isert_conn->kref);
TRACE_EXIT();
return isert_conn;
@@ -1315,6 +1314,7 @@ static int isert_cm_connect_handler(struct rdma_cm_id *cm_id,
if (unlikely(ret))
goto out;
kref_get(&isert_conn->kref);
kref_get(&isert_conn->kref);
/* notify upper layer */
ret = isert_conn_established(&isert_conn->iscsi,