]> git.karo-electronics.de Git - linux-beck.git/commitdiff
[SCSI] be2iscsi: Free tags allocated
authorJayamohan Kallickal <jayamohank@serverengines.com>
Wed, 21 Jul 2010 22:54:22 +0000 (04:24 +0530)
committerJames Bottomley <James.Bottomley@suse.de>
Wed, 28 Jul 2010 14:05:33 +0000 (09:05 -0500)
This patch  frees tags that are already allocated in case of
failure

Signed-off-by: Jayamohan Kallickal <jayamohank@serverengines.com>
Reviewed-by: Mike Christie <michaelc@cs.wisc.edu>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
drivers/scsi/be2iscsi/be_mgmt.c

index dcb70fac2fceb1b5cfb4e0dcd8fc35313c84ef83..3036d9ee7902a5b381a4f02309c4941c987632c4 100644 (file)
@@ -168,6 +168,7 @@ unsigned int  mgmt_invalidate_icds(struct beiscsi_hba *phba,
                SE_DEBUG(DBG_LVL_1,
                         "Failed to alloc memory for mgmt_invalidate_icds\n");
                spin_unlock(&ctrl->mbox_lock);
+               free_mcc_tag(&phba->ctrl, tag);
                return 0;
        }
        nonemb_cmd.size = sizeof(struct invalidate_commands_params_in);
@@ -330,6 +331,7 @@ int mgmt_open_connection(struct beiscsi_hba *phba,
                shost_printk(KERN_ERR, phba->shost, "unknown addr family %d\n",
                             dst_addr->sa_family);
                spin_unlock(&ctrl->mbox_lock);
+               free_mcc_tag(&phba->ctrl, tag);
                return -EINVAL;
 
        }