mirror of
https://github.com/SCST-project/scst.git
synced 2026-05-14 09:11:27 +00:00
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:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user