diff options
author | tangwenji <tang.wenji@zte.com.cn> | 2019-03-20 22:14:44 +0800 |
---|---|---|
committer | Martin K. Petersen <martin.petersen@oracle.com> | 2019-03-20 20:38:07 -0400 |
commit | f55d0b40eccfcfb50f93cc7d03c95e25ab19917e (patch) | |
tree | 5c7aa2ff85d1dcf162bcd51699009c22d145ed9e /drivers/target | |
parent | 1ea9b4633cda461f09b4476ff612d32d78e81c92 (diff) | |
download | linux-f55d0b40eccfcfb50f93cc7d03c95e25ab19917e.tar.gz linux-f55d0b40eccfcfb50f93cc7d03c95e25ab19917e.tar.bz2 linux-f55d0b40eccfcfb50f93cc7d03c95e25ab19917e.zip |
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: tangwenji <tang.wenji@zte.com.cn>
Reviewed-by: Mike Christie <mchristi@redhat.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'drivers/target')
-rw-r--r-- | drivers/target/iscsi/iscsi_target_login.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/target/iscsi/iscsi_target_login.c b/drivers/target/iscsi/iscsi_target_login.c index c526e665f022..683d04580eb3 100644 --- a/drivers/target/iscsi/iscsi_target_login.c +++ b/drivers/target/iscsi/iscsi_target_login.c @@ -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: |