Commit f55d0b40 authored by tangwenji's avatar tangwenji Committed by Martin K. Petersen

scsi: target: iscsi: Free conn_ops when zalloc_cpumask_var failed

It should not free cpumask but free conn->conn_ops when zalloc_cpumask_var
failed.
Signed-off-by: default avatartangwenji <tang.wenji@zte.com.cn>
Reviewed-by: default avatarMike Christie <mchristi@redhat.com>
Signed-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
parent 1ea9b463
......@@ -1156,13 +1156,13 @@ static struct iscsi_conn *iscsit_alloc_conn(struct iscsi_np *np)
if (!zalloc_cpumask_var(&conn->conn_cpumask, GFP_KERNEL)) {
pr_err("Unable to allocate conn->conn_cpumask\n");
goto free_mask;
goto free_conn_ops;
}
return conn;
free_mask:
free_cpumask_var(conn->conn_cpumask);
free_conn_ops:
kfree(conn->conn_ops);
put_transport:
iscsit_put_transport(conn->conn_transport);
free_conn:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment